From 3a15b2f979912d862b4124656328362d5172dab6 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 8 Jun 2016 15:45:00 +0100 Subject: [PATCH] Launcher: fix a crash on searching locations When hitting return multiple times, could hit a null-pointer crash here. --- src/GUI/LocationWidget.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/GUI/LocationWidget.cxx b/src/GUI/LocationWidget.cxx index 162a7c5d9..7c5ae624e 100644 --- a/src/GUI/LocationWidget.cxx +++ b/src/GUI/LocationWidget.cxx @@ -316,6 +316,10 @@ private slots: void onSearchResultsPoll() { + if (m_search.isNull()) { + return; + } + PositionedIDVec newIds = m_search->results(); beginInsertRows(QModelIndex(), m_ids.size(), newIds.size() - 1);