summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Import/src/import.cpp4
-rw-r--r--plugins/Import/src/wizard.cpp1
2 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index 9f854ced14..527e922cfb 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -485,12 +485,15 @@ bool ImportAccounts(OBJLIST<char> &arSkippedModules)
if (!Proto_GetAccount(p->szSrcAcc))
szNewInternalName = p->szSrcAcc; // but if the original internal name is available, keep it
+ CopySettings(NULL, p->szSrcAcc, NULL, szNewInternalName);
+
p->pa = Proto_CreateAccount(szNewInternalName, p->szBaseProto, p->tszSrcName);
if (p->pa == nullptr) {
AddMessage(LPGENW("Unable to create an account %s of protocol %S"), p->tszSrcName, p->szBaseProto);
continue;
}
}
+ else CopySettings(NULL, p->szSrcAcc, NULL, p->pa->szModuleName);
char szSetting[100];
itoa(400 + p->iSrcIndex, szSetting, 10);
@@ -511,7 +514,6 @@ bool ImportAccounts(OBJLIST<char> &arSkippedModules)
db_set_ws(NULL, "Protocols", szSetting, p->pa->tszAccountName);
}
- CopySettings(NULL, p->szSrcAcc, NULL, p->pa->szModuleName);
if (bImportSysAll)
arSkippedModules.insert(newStr(p->szSrcAcc));
}
diff --git a/plugins/Import/src/wizard.cpp b/plugins/Import/src/wizard.cpp
index 4f54560ddc..459b0f4391 100644
--- a/plugins/Import/src/wizard.cpp
+++ b/plugins/Import/src/wizard.cpp
@@ -165,6 +165,7 @@ INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lP
break;
case WM_DESTROY:
+ hwndWizard = nullptr;
if (g_bSendQuit)
PostQuitMessage(0);
}