diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/clist/movetogroup.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/modules/clist/movetogroup.cpp b/src/modules/clist/movetogroup.cpp index 5877bb9949..97d8c745e9 100644 --- a/src/modules/clist/movetogroup.cpp +++ b/src/modules/clist/movetogroup.cpp @@ -100,7 +100,7 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM) CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)lphGroupsItems[i], 0);
lphGroupsItems.destroy();
- TCHAR *szContactGroup = DBGetStringT((HANDLE)wParam, "CList", "Group");
+ mir_ptr<TCHAR> szContactGroup( db_get_tsa((HANDLE)wParam, "CList", "Group"));
int pos = 1000;
@@ -123,15 +123,12 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM) mir_free(dbv.ptszVal);
}
- for (i=0; i < groups.getCount(); i++)
- {
+ for (i=0; i < groups.getCount(); i++) {
bool checked = szContactGroup && !_tcscmp(szContactGroup, groups[i].name);
AddGroupItem(hMoveToGroupItem, groups[i].name, ++pos, groups[i].position, checked);
}
groups.destroy();
- mir_free(szContactGroup);
-
return 0;
}
|