summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src/moduletree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/DbEditorPP/src/moduletree.cpp')
-rw-r--r--plugins/DbEditorPP/src/moduletree.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp
index e23dfe866a..662c66ea85 100644
--- a/plugins/DbEditorPP/src/moduletree.cpp
+++ b/plugins/DbEditorPP/src/moduletree.cpp
@@ -46,9 +46,9 @@ int doContacts(HTREEITEM contactsRoot, ModuleSettingLL *modlist, MCONTACT hSelec
char szProto[FLD_SIZE];
wchar_t name[NAME_SIZE];
- for (MCONTACT hContact = db_find_first(); hContact && hwnd2mainWindow; hContact = db_find_next(hContact)) {
-
- if (ApplyProtoFilter(hContact)) continue;
+ for (auto &hContact : contact_iter()) {
+ if (ApplyProtoFilter(hContact))
+ continue;
// add the contact
lParam = (ModuleTreeInfoStruct *)mir_calloc(sizeof(ModuleTreeInfoStruct));