Skip to content

Commit

Permalink
Fixed crash in upgrades windows
Browse files Browse the repository at this point in the history
Because of early return, upgrade window wasn't cleaned up and caused
crashes.
  • Loading branch information
Xottab-DUTY committed Sep 26, 2019
1 parent 10d27e4 commit 92a8f70
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/xrGame/ui/UIInventoryUpgradeWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ void CUIInventoryUpgradeWnd::InitInventory(CUICellItem* cellItem, bool can_upgra
if (m_item_info)
m_item_info->InitItem(cellItem);

if (!cellItem)
return;

m_inv_item = static_cast<PIItem>(cellItem ? cellItem->m_pData : nullptr);
// Загружаем картинку
if (m_item && m_inv_item)
Expand Down Expand Up @@ -146,6 +143,8 @@ void CUIInventoryUpgradeWnd::InitInventory(CUICellItem* cellItem, bool can_upgra
else
m_item->Show(false);
}
else if (m_item)
m_item->Show(false);

m_scheme_wnd->DetachAll();
m_scheme_wnd->Show(false);
Expand Down

1 comment on commit 92a8f70

@Xottab-DUTY
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are interested, the bug was introduced in 39d71fd.

Please sign in to comment.