mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-29 23:15:56 -04:00
fix some cppcheck detected (potential) issues
This commit is contained in:
@@ -123,6 +123,7 @@ void ReportManager::addReport(Unicode::String const &reportingName, NetworkId co
|
||||
if (((systemTime - iterReportThrottle->second) >= s_throttleTime))
|
||||
{
|
||||
s_reportThrottle.erase(iterReportThrottle);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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