summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/group_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index 1ecb8172b..807039133 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -40,7 +40,7 @@ static void BuildGroupList(grouplist_d* gl, PlayerID owner, VehicleType vehicle_
const Group *g;
uint n = 0;
- if (!(gl->l.flags & VL_REBUILD)) return;
+ if (!(gl->l.flags & VL_REBUILD) || GetGroupArraySize() == 0) return;
list = MallocT<const Group*>(GetGroupArraySize());
if (list == NULL) {