Prevent script error in buy menu

ERROR: '->': invalid target type nil, expected proplist
 by: Object(9419)->GetBuyValue() (Objects.ocd/Libraries.ocd/Structures.ocd/Vendor.ocd/Script.c:23)
 by: Object(9419)->DoBuy(0,0,0,Object(270),0,true) (Objects.ocd/Libraries.ocd/Structures.ocd/Vendor.ocd/Script.c:77)
 by: Object(9419)->OnBuyMenuSelection(0,0,Object(270)) (Objects.ocd/Libraries.ocd/Structures.ocd/Vendor.ocd/Script.c:269)
 by: Object(60927)->OnMenuEntrySelected({index = 2, slot = 1},10) (Objects.ocd/HUD.ocd/ObjectInteractionMenu.ocd/Script.c:880)
 by: Object(60940)->DoCall(10,0,Object(60927)) (Objects.ocd/HUD.ocd/MenuStyles.ocd/List.ocd/Script.c:166)
 by: Object(60940)->OnClick(0,0,6090,10,Object(60940)) (Objects.ocd/HUD.ocd/MenuStyles.ocd/List.ocd/Script.c:175)
install-platforms
Lukas Werling 2017-12-27 12:54:50 +01:00
parent d43051b180
commit 3583bfcbb6
1 changed files with 1 additions and 0 deletions

View File

@ -262,6 +262,7 @@ public func GetBuyMenuEntries(object clonk)
public func OnBuyMenuSelection(id def, extra_data, object clonk)
{
if (!def) return;
// distinguish owners
var wealth_player = GetOwner();
var for_player = clonk->GetController();