We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5473fc0 commit ae4e137Copy full SHA for ae4e137
WinFormsCellLifeSimulationApp/SimDrawController.cpp
@@ -166,5 +166,7 @@ void SimDrawController::draw(std::vector<SimulationModel::drawEntity> entities)
166
167
void SimDrawController::fitSimSize()
168
{
169
- if (sim != nullptr)sim->setSize(pictureBox->Size.Width, pictureBox->Size.Height);
+ if (sim != nullptr && pictureBox->Size.Width > 0 && pictureBox->Size.Height > 0) {
170
+ sim->setSize(pictureBox->Size.Width, pictureBox->Size.Height);
171
+ }
172
}
0 commit comments