]> git.mxchange.org Git - flightgear.git/commitdiff
Launcher: fix a crash on searching locations
authorJames Turner <zakalawe@mac.com>
Wed, 8 Jun 2016 14:45:00 +0000 (15:45 +0100)
committerRoland Haeder <roland@mxchange.org>
Thu, 22 Sep 2016 21:27:36 +0000 (23:27 +0200)
When hitting return multiple times, could hit a null-pointer
crash here.

src/GUI/LocationWidget.cxx

index 162a7c5d9fcf4d0910cde7b076125d203680d459..7c5ae624ecd806d934c4325c816a9b0f9f36f4e8 100644 (file)
@@ -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);