summaryrefslogtreecommitdiff
path: root/plugins/ListeningTo/src/listeningto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ListeningTo/src/listeningto.cpp')
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index 62ecd7c48e..2f9933ca82 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -300,8 +300,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
// Extra icon support
hExtraIcon = ExtraIcon_Register(MODULE_NAME, LPGEN("Listening to music"), "listening_to_icon");
- HANDLE hContact = db_find_first();
- while (hContact != NULL) {
+ for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
if (proto != NULL) {
DBVARIANT dbv;
@@ -312,8 +311,6 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
db_free(&dbv);
}
}
-
- hContact = db_find_next(hContact);
}
// Add main menu item