From fce5a0d448b51588ac0e37a67bd88f38578a46cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Fri, 20 Nov 2015 15:55:35 +0100 Subject: [PATCH] Fix OS X crash when navigating in empty file Fix crash when pressing navigation keys in an empty file (which has the corresponding menu items disabled). --- src/edframe.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/edframe.cpp b/src/edframe.cpp index c8d31ee260..11d1f5c8ad 100644 --- a/src/edframe.cpp +++ b/src/edframe.cpp @@ -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;