diff --git a/changelog.txt b/changelog.txt index ff95ea0..686b60e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,10 @@ --------------------------------------------------------------------------------------------------- +Version: 0.5.2 +Date: 2022-10-23 +Bugfixes: + - Fixed crash when launching pod with cargo in Space Exploration mod + https://mods.factorio.com/mod/attach-notes/discussion/62c12765caa02a955856391a +--------------------------------------------------------------------------------------------------- Version: 0.5.1 Date: 2021-04-26 Changes: diff --git a/info.json b/info.json index 022aae7..700540c 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "attach-notes", - "version": "0.5.1", + "version": "0.5.2", "factorio_version": "1.1", "title": "Attach Notes", "author": "321freddy", diff --git a/scripts/entity-notes/controller.lua b/scripts/entity-notes/controller.lua index b10c923..6af0051 100644 --- a/scripts/entity-notes/controller.lua +++ b/scripts/entity-notes/controller.lua @@ -173,7 +173,11 @@ function this.on_entity_destroyed(event) for index,cache in pairs(global.cache) do if not util.isValid(game.players[index]) then global.cache[index] = nil - elseif cache.openedEntityGui and cache.openedEntityGui.unit_number == unitNumber then + elseif cache.openedEntityGui + -- Tireons bugfix 0.5.2 + and cache.openedEntityGui.valid + -- bugfix end + and cache.openedEntityGui.unit_number == unitNumber then this.destroyGUI(game.players[index], cache) end end @@ -541,4 +545,4 @@ function this.on_string_translated(event) cache.translateTarget = nil end -return this \ No newline at end of file +return this