SAGA2: Fix potential null dereference. CID 1457869

This commit is contained in:
Eugene Sandulenko 2021-07-06 21:19:03 +02:00
parent 967f745c68
commit 2223717753
No known key found for this signature in database
GPG Key ID: 014D387312D34F08

View File

@ -1488,9 +1488,6 @@ void ContainerNode::show(void) {
// open the window; Object should already be "open"
if (window == NULL) {
switch (type) {
case readyType:
return;
case physicalType:
physicalContainerAppearance.rows = proto->getViewableRows();
physicalContainerAppearance.cols = proto->getViewableCols();
@ -1512,6 +1509,10 @@ void ContainerNode::show(void) {
case enchantType:
window = new EnchantmentContainerWindow(*this, enchantmentContainerAppearance);
break;
case readyType:
default:
return;
}
}