summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/charcreatedialog.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 049d91dc6..eba1dd96e 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -30,6 +30,7 @@
#include "gui/widgets/button.h"
#include "gui/windows/charselectdialog.h"
+#include "gui/widgets/createwidget.h"
#include "gui/widgets/label.h"
#include "gui/widgets/playerbox.h"
#include "gui/widgets/slider.h"
@@ -372,8 +373,9 @@ void CharCreateDialog::action(const ActionEvent &event)
}
else
{
- // TRANSLATORS: char creation error
- (new OkDialog(_("Error"),
+ CREATEWIDGET(OkDialog,
+ // TRANSLATORS: char creation error
+ _("Error"),
// TRANSLATORS: char creation error
_("Your name needs to be at least 4 characters."),
// TRANSLATORS: ok dialog button
@@ -382,7 +384,7 @@ void CharCreateDialog::action(const ActionEvent &event)
Modal_true,
ShowCenter_true,
nullptr,
- 260))->postInit();
+ 260);
}
}
else if (id == "cancel")