diff --git a/src/widget/loginscreen.cpp b/src/widget/loginscreen.cpp index db3ce69c2..2ac1ba083 100644 --- a/src/widget/loginscreen.cpp +++ b/src/widget/loginscreen.cpp @@ -245,10 +245,8 @@ void LoginScreen::retranslateUi() void LoginScreen::onImportProfile() { - ProfileImporter* pi = new ProfileImporter(this); - - if (pi->importProfile()) + ProfileImporter pi(this); + if (pi.importProfile()) { reset(); - - delete pi; + } }