We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccbf0b5 commit 2d9e66aCopy full SHA for 2d9e66a
Menus/InventoryMenuGUI.cpp
@@ -1301,7 +1301,10 @@ namespace RTE {
1301
};
1302
1303
if (m_GUISelectedItem->EquippedItemIndex > -1) {
1304
- LaunchInventoryItem(dynamic_cast<Arm *>(m_GUISelectedItem->Object->GetParent())->RemoveAttachable(dynamic_cast<Arm *>(m_GUISelectedItem->Object->GetParent())->GetHeldDevice()));
+ Attachable *itemToLaunch = dynamic_cast<Arm *>(m_GUISelectedItem->Object->GetParent())->RemoveAttachable(dynamic_cast<Arm *>(m_GUISelectedItem->Object->GetParent())->GetHeldDevice());
1305
+ if (itemToLaunch) {
1306
+ LaunchInventoryItem(itemToLaunch);
1307
+ }
1308
} else {
1309
LaunchInventoryItem(m_InventoryActor->RemoveInventoryItemAtIndex(m_GUISelectedItem->InventoryIndex));
1310
}
0 commit comments