diff --git a/mapeditor/windownewmap.cpp b/mapeditor/windownewmap.cpp index 7cc7a124b..35a6dcc4f 100644 --- a/mapeditor/windownewmap.cpp +++ b/mapeditor/windownewmap.cpp @@ -37,8 +37,10 @@ WindowNewMap::WindowNewMap(QWidget *parent) : show(); //setup initial parameters - mapGenOptions.setWidth(ui->widthTxt->text().toInt()); - mapGenOptions.setHeight(ui->heightTxt->text().toInt()); + int width = ui->widthTxt->text().toInt(); + int height = ui->heightTxt->text().toInt(); + mapGenOptions.setWidth(width ? width : 1); + mapGenOptions.setHeight(height ? height : 1); bool twoLevel = ui->twoLevelCheck->isChecked(); mapGenOptions.setHasTwoLevels(twoLevel); updateTemplateList();