Skip to content

Commit 32970f9

Browse files
committed
Util.get_blueprint could be called with a nil itemstack in some circumstances, which would cause it to fail. It now returns nil in this case.
Fixes an issue with migrating the GUI and doing initial setup for it.
1 parent d29c1b1 commit 32970f9

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ discussion page, and messages posted there will likely be ignored.**
4646

4747
## Changelog
4848

49+
### 0.4.3 (2019-04-01)
50+
* Fix yet another crash on loading a save that had an old version of Blueprint Extensions (only on some systems)
51+
4952
### 0.4.2 (2019-04-01)
5053
* Fix another crash on loading a save that had an old version of Blueprint Extensions (only on some systems)
5154

changelog.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version: 0.4.3
2+
---------------------------------------------------------------------------------------------------
3+
Date: 01. 04. 2019
4+
Bugfixes:
5+
- Fix another crash on loading a save that had an old version of Blueprint Extensions (only on some systems)
6+
17
Version: 0.4.2
28
---------------------------------------------------------------------------------------------------
39
Date: 01. 04. 2019

info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "BlueprintExtensions",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"title": "Blueprint Extensions",
55
"author": "Dewin",
66
"contact": "https://github.com/dewiniaid/BlueprintExtensions",

util.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ local Util = {}
44

55
-- Returns the item if it is a blueprint, the selected blueprint in the book if it is a blueprint book, or nil.
66
function Util.get_blueprint(bp)
7-
if not (bp.valid and bp.valid_for_read) then
7+
if not (bp and bp.valid and bp.valid_for_read) then
88
return nil
99
end
1010
if bp.is_blueprint_book and bp.active_index then

0 commit comments

Comments
 (0)