From 3d98d55fe585c38e755cac496caf8e9496130d1f Mon Sep 17 00:00:00 2001 From: Kux <66268429+kuxynator@users.noreply.github.com> Date: Sat, 5 Sep 2020 01:22:00 +0200 Subject: [PATCH 1/3] Update util.lua --- util.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util.lua b/util.lua index fadba7f..e33734c 100644 --- a/util.lua +++ b/util.lua @@ -8,7 +8,11 @@ function Util.get_blueprint(bp) return nil end if bp.is_blueprint_book and bp.active_index then - return Util.get_blueprint(bp.get_inventory(defines.inventory.item_main)[bp.active_index]) + local inventory = bp.get_inventory(defines.inventory.item_main) + if inventory.get_item_count() == 0 then + return nil + end + return Util.get_blueprint(inventory[bp.active_index]) end if bp.is_blueprint then return bp From e707d37c99394b80a5095ff73e6de7a3a8077e59 Mon Sep 17 00:00:00 2001 From: Kux <66268429+kuxynator@users.noreply.github.com> Date: Sat, 5 Sep 2020 01:24:12 +0200 Subject: [PATCH 2/3] Update changelog.txt --- changelog.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/changelog.txt b/changelog.txt index 9da35be..c372364 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,9 @@ +--------------------------------------------------------------------------------------------------- +Version: 0.5.1 +Date: 05. 09. 2020 + Bugfixes: + - Fix crash on selecting new blueprint book + --------------------------------------------------------------------------------------------------- Version: 0.5.0 Date: 31. 01. 2020 From 0388373e3873dee814f7a790c4cd3b2dab3c8683 Mon Sep 17 00:00:00 2001 From: Kux <66268429+kuxynator@users.noreply.github.com> Date: Sat, 5 Sep 2020 01:25:00 +0200 Subject: [PATCH 3/3] Update info.json --- info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/info.json b/info.json index 8c01dce..567dd65 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "BlueprintExtensions", - "version": "0.5.0", + "version": "0.5.1", "title": "Blueprint Extensions", "author": "Dewin", "contact": "https://github.com/dewiniaid/BlueprintExtensions",