From 528fbe3d428eab70c5e78606f2c79593f14ddb4f Mon Sep 17 00:00:00 2001 From: Dave Kapell Date: Thu, 16 Apr 2026 09:45:57 -0400 Subject: [PATCH] Only run scan completed callback if it exists --- src/systems/scanning.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/systems/scanning.cpp b/src/systems/scanning.cpp index 7464d7bc27..277c5cbd77 100644 --- a/src/systems/scanning.cpp +++ b/src/systems/scanning.cpp @@ -53,8 +53,8 @@ void ScanningSystem::scanningFinished(sp::ecs::Entity command_source) case ScanState::State::FullScan: break; } - - LuaConsole::checkResult(ss->on_scan_completed.call(scanner->target, command_source, scanner->source)); + if (ss->on_scan_completed) + LuaConsole::checkResult(ss->on_scan_completed.call(scanner->target, command_source, scanner->source)); } scanner->target = {};