Skip to content

Commit

Permalink
Fix OS X crash when navigating in empty file
Browse files Browse the repository at this point in the history
Fix crash when pressing navigation keys in an empty file (which has the
corresponding menu items disabled).
  • Loading branch information
vslavik committed Nov 20, 2015
1 parent 21ab527 commit fce5a0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/edframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3815,6 +3815,8 @@ long PoeditFrame::NavigateGetNextItem(const long start,

void PoeditFrame::Navigate(int step, NavigatePredicate predicate, bool wrap)
{
if (!m_list)
return;
auto i = NavigateGetNextItem(m_list->GetFirstSelected(), step, predicate, wrap, nullptr);
if (i == -1)
return;
Expand Down

0 comments on commit fce5a0d

Please sign in to comment.