From b53d9e282e777673cb217523ea4df9c66fc92a14 Mon Sep 17 00:00:00 2001 From: Viktor Palmkvist Date: Wed, 26 Aug 2015 11:54:51 +0200 Subject: [PATCH] Fix segfault in edge case when jumping backwards in jumplist Closes #380 --- src/context.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/context.cc b/src/context.cc index af566113..e3eed5b1 100644 --- a/src/context.cc +++ b/src/context.cc @@ -127,6 +127,8 @@ const SelectionList& Context::jump_backward() { push_jump(); --m_current_jump; + if (m_current_jump == m_jump_list.begin()) + throw runtime_error("no previous jump"); } SelectionList& res = *--m_current_jump; res.update();