mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-07-31 01:15:48 -04:00
fix some cppcheck detected (potential) issues
This commit is contained in:
@@ -1637,9 +1637,9 @@ Crafting::CraftingError PlayerObject::fillSlot(int slotIndex, int slotOptionInde
|
||||
}
|
||||
slotOptionIndex = i;
|
||||
|
||||
if (slotOption->ingredients.size() != 1)
|
||||
if (slotOption == NULL || slotOption->ingredients.size() != 1)
|
||||
{
|
||||
WARNING(true, ("Ingredient %d for draft schematic %s, slot %s, has ingredient count != 1",
|
||||
WARNING(true, ("slotOption is NULL or ingredient %d for draft schematic %s, slot %s, has ingredient count != 1",
|
||||
slotOptionIndex, m_draftSchematic->getTemplateName(), draftSlot.name.getText().c_str()));
|
||||
return Crafting::CE_invalidIngredientSize;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user