From abfd1a42053eb6393394fee1ac23a2b608499d47 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Fri, 25 Aug 2023 18:35:25 +0300 Subject: minor dependency crash fix Signed-off-by: Trial97 --- launcher/modplatform/flame/FlameModIndex.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'launcher/modplatform') diff --git a/launcher/modplatform/flame/FlameModIndex.cpp b/launcher/modplatform/flame/FlameModIndex.cpp index a63bdc99..494dc2a7 100644 --- a/launcher/modplatform/flame/FlameModIndex.cpp +++ b/launcher/modplatform/flame/FlameModIndex.cpp @@ -211,5 +211,7 @@ ModPlatform::IndexedVersion FlameMod::loadDependencyVersions(const ModPlatform:: return a.date > b.date; }; std::sort(versions.begin(), versions.end(), orderSortPredicate); - return versions.front(); + if (versions.size() != 0) + return versions.front(); + return {}; } -- cgit