mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-07-14 00:01:30 -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;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -158,7 +158,7 @@ CSAssistGameAPIcore::CSAssistGameAPIcore(CSAssistGameAPI *api, const char *serve
|
||||
//fprintf(stderr, "res=%d, p=%s, host=%s, port=%d, size=%d\n", res, p, host, port, m_serverList.size());
|
||||
delete [] p;
|
||||
}
|
||||
delete host;
|
||||
delete [] host;
|
||||
delete [] buf;
|
||||
m_curServer = m_serverList.begin();
|
||||
GetLBHost();
|
||||
|
||||
Reference in New Issue
Block a user