Fix crash when the on_rocket_launched event doesn't have a rocket_silo

This commit is contained in:
Simon Brodtmann 2025-05-30 21:54:11 +02:00
parent 81214f2a46
commit f8671cf738

View file

@ -58,7 +58,7 @@ end
ToNauvis.events[defines.events.on_rocket_launched] = function(event)
if event.rocket_silo.name ~= "provisional-rocket-silo" then return end
if not event.rocket_silo or event.rocket_silo.name ~= "provisional-rocket-silo" then return end
local rocket_entry
local rocket_entry_index