mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 00:36:46 +00:00
Avoid zero division
This commit is contained in:
parent
ca2a524a5f
commit
079c77ff22
1 changed files with 6 additions and 2 deletions
|
@ -730,8 +730,12 @@ void CSVRender::TerrainTextureMode::setBrushShape(int brushShape)
|
||||||
selectionCenterY += value.second;
|
selectionCenterY += value.second;
|
||||||
++selectionAmount;
|
++selectionAmount;
|
||||||
}
|
}
|
||||||
selectionCenterX /= selectionAmount;
|
|
||||||
selectionCenterY /= selectionAmount;
|
if (selectionAmount != 0)
|
||||||
|
{
|
||||||
|
selectionCenterX /= selectionAmount;
|
||||||
|
selectionCenterY /= selectionAmount;
|
||||||
|
}
|
||||||
|
|
||||||
mCustomBrushShape.clear();
|
mCustomBrushShape.clear();
|
||||||
for (auto const& value: terrainSelection)
|
for (auto const& value: terrainSelection)
|
||||||
|
|
Loading…
Reference in a new issue