Fix crash when ID for Item.getItemByID = ""
This commit is contained in:
parent
48af8b91d7
commit
86d6f706e9
|
@ -388,11 +388,13 @@ Public MustInherit Class Item
|
||||||
LoadItemBuffer()
|
LoadItemBuffer()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim type = _itemBuffer.FirstOrDefault(Function(itemTypePair)
|
If ID <> "" Then
|
||||||
Return itemTypePair.Key.Id = CInt(ID)
|
Dim type = _itemBuffer.FirstOrDefault(Function(itemTypePair)
|
||||||
End Function).Value
|
Return itemTypePair.Key.Id = CInt(ID)
|
||||||
If type IsNot Nothing Then
|
End Function).Value
|
||||||
Return CType(Activator.CreateInstance(type), Item)
|
If type IsNot Nothing Then
|
||||||
|
Return CType(Activator.CreateInstance(type), Item)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
Loading…
Reference in New Issue