Author: mir3x
Date: Wed Nov 25 19:59:36 2015
New Revision: 30768

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

See bug #24111


Modified:
    trunk/client/gui-qt/dialogs.cpp

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