summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/engine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 096721137..3f361c048 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -138,6 +138,7 @@ void EngList_SortPartial(EngineList *el, EngList_SortTypeFunction compare, uint
{
assert(begin <= (uint)el->size());
assert(begin + num_items <= (uint)el->size());
+ if (num_items < 2) return;
qsort(&((*el)[begin]), num_items, sizeof(EngineID), compare);
}