Author: mir3x
Date: Wed Nov 25 19:59:28 2015
New Revision: 30767

URL: http://svn.gna.org/viewcvs/freeciv?rev=30767&view=rev
Log:
Fixed failed assertions in unit selection dialog in qt-client.

See bug #24111


Modified:
    branches/S2_6/client/gui-qt/dialogs.cpp

Modified: branches/S2_6/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/dialogs.cpp?rev=30767&r1=30766&r2=30767&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/dialogs.cpp     (original)
+++ branches/S2_6/client/gui-qt/dialogs.cpp     Wed Nov 25 19:59:28 2015
@@ -2558,11 +2558,13 @@
     }
   }
   unit_list.clear();
-  unit_list_iterate(utile->units, punit) {
-    if (i > show_line * 4)
-      unit_list.push_back(punit);
-    i++;
-  } unit_list_iterate_end;
+  if (utile != nullptr) {
+    unit_list_iterate(utile->units, punit) {
+      if (i > show_line * 4)
+        unit_list.push_back(punit);
+      i++;
+    } unit_list_iterate_end;
+  }
   if (unit_list.count() == 0) {
     close();
   }


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to