From cecca857def5d185aac2f6371ba8f01ee91be4e0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 12 Dec 2023 16:55:55 +0300 Subject: AddUser dialog displays garbage if no parent window is set --- src/mir_app/src/addcontact.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/addcontact.cpp b/src/mir_app/src/addcontact.cpp index 29bc8da968..4e1c822bec 100644 --- a/src/mir_app/src/addcontact.cpp +++ b/src/mir_app/src/addcontact.cpp @@ -251,10 +251,7 @@ MIR_APP_DLL(void) Contact::AddBySearch(const char *szProto, struct PROTOSEARCHRE } }; - if (hwndParent != nullptr) { - CAddBySearch dlg(szProto, psr); - dlg.SetParent(hwndParent); - dlg.DoModal(); - } - else (new CAddBySearch(szProto, psr))->Show(); + CAddBySearch dlg(szProto, psr); + dlg.SetParent(hwndParent); + dlg.DoModal(); } -- cgit v1.2.3