Author: mir3x
Date: Wed Nov 25 19:59:22 2015
New Revision: 30766

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

See bug #24111


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

Modified: branches/S2_5/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/dialogs.cpp?rev=30766&r1=30765&r2=30766&view=diff
==============================================================================
--- branches/S2_5/client/gui-qt/dialogs.cpp     (original)
+++ branches/S2_5/client/gui-qt/dialogs.cpp     Wed Nov 25 19:59:22 2015
@@ -2347,11 +2347,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