(svn r13315) -Fix (r13314): Assert if no engines or wagons available
authorpeter1138
Wed, 28 May 2008 20:06:00 +0000
changeset 10765 34cd0fa4baed
parent 10764 e46596b87826
child 10766 db9ef2a1830a
(svn r13315) -Fix (r13314): Assert if no engines or wagons available
src/engine_gui.cpp
--- a/src/engine_gui.cpp	Wed May 28 17:29:27 2008 +0000
+++ b/src/engine_gui.cpp	Wed May 28 20:06:00 2008 +0000
@@ -214,9 +214,9 @@
  */
 void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items)
 {
+	if (num_items < 2) return;
 	assert(begin < el->Length());
 	assert(begin + num_items <= el->Length());
-	if (num_items < 2) return;
 	qsort(el->Get(begin), num_items, sizeof(*el->Begin()), compare);
 }