summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-05 18:12:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-05 18:12:13 +0300
commit1bc38e87f4f75b9c665c7cb3fe470b79e7ed9281 (patch)
tree85ff6abeae3998f105b2892460a65e5e56301c5d /plugins
parentb1ac2547316dca56f32d238d50dc2dc6c8e8aedf (diff)
Import crashes if the original profile contains wrong number of groups
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Import/src/import.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index 127a21ff5e..7e61b493fb 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -600,7 +600,9 @@ struct MImportGroup
static int ImportGroup(const char* szSettingName, void *param)
{
OBJLIST<MImportGroup> *pArray = (OBJLIST<MImportGroup>*)param;
- pArray->insert(new MImportGroup(atoi(szSettingName), myGetWs(NULL, "CListGroups", szSettingName)));
+ wchar_t *wszGroupName = myGetWs(NULL, "CListGroups", szSettingName);
+ if (wszGroupName != nullptr)
+ pArray->insert(new MImportGroup(atoi(szSettingName), wszGroupName));
return 0;
}