mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Fix crash related to zeros stored in settings
This commit is contained in:
@@ -37,8 +37,10 @@ WindowNewMap::WindowNewMap(QWidget *parent) :
|
|||||||
show();
|
show();
|
||||||
|
|
||||||
//setup initial parameters
|
//setup initial parameters
|
||||||
mapGenOptions.setWidth(ui->widthTxt->text().toInt());
|
int width = ui->widthTxt->text().toInt();
|
||||||
mapGenOptions.setHeight(ui->heightTxt->text().toInt());
|
int height = ui->heightTxt->text().toInt();
|
||||||
|
mapGenOptions.setWidth(width ? width : 1);
|
||||||
|
mapGenOptions.setHeight(height ? height : 1);
|
||||||
bool twoLevel = ui->twoLevelCheck->isChecked();
|
bool twoLevel = ui->twoLevelCheck->isChecked();
|
||||||
mapGenOptions.setHasTwoLevels(twoLevel);
|
mapGenOptions.setHasTwoLevels(twoLevel);
|
||||||
updateTemplateList();
|
updateTemplateList();
|
||||||
|
Reference in New Issue
Block a user