From 03c364765eb65c5e7a01f6133dad4bb3b35b7708 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Mon, 28 Dec 2020 18:04:04 +0100 Subject: [PATCH] Fixes issue where resolving script could segfault. --- src/ScriptResolving/AngelScript/AngelScriptResolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp b/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp index 7d10447..df14a36 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp +++ b/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp @@ -142,7 +142,7 @@ CreatureLib::Battling::Script* AngelScriptResolver::LoadScript(ScriptCategory ca innerDb.Insert(scriptName, nullptr); return nullptr; } - if (!t.has_value()) { + if (t == nullptr) { return nullptr; } auto ctx = _contextPool->RequestContext();