Skip to content

Commit

Permalink
Fix possible element-less on_gui_closed event
Browse files Browse the repository at this point in the history
Fixes #91
  • Loading branch information
narc0tiq committed Mar 23, 2019
1 parent ee9bddd commit b6260aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.1
0.8.2
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 0.8.2
Date: 2019-03-23
Bugfixes:
- Prevent an error when Esc-closing a GUI with event.element being unavailable (e.g., the FNEI GUI).

---------------------------------------------------------------------------------------------------
Version: 0.8.1
Date: 2019-03-23
Expand Down
2 changes: 1 addition & 1 deletion resmon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ end

function resmon.on_gui_closed(event)
if event.gui_type ~= defines.gui_type.custom then return end
if not event.element.valid then return end
if not event.element or not event.element.valid then return end
if event.element.name ~= "YARM_site_rename" then return end

resmon.on_click.YARM_rename_cancel(event)
Expand Down

0 comments on commit b6260aa

Please sign in to comment.