summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/DbEditorPP/src/modsettingenum.cpp7
-rw-r--r--plugins/DbEditorPP/src/modsettingenum.h2
-rw-r--r--plugins/Dbx_mdb/src/dbsettings.cpp3
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/DbEditorPP/src/modsettingenum.cpp b/plugins/DbEditorPP/src/modsettingenum.cpp
index 8c315f2a70..00bac689c9 100644
--- a/plugins/DbEditorPP/src/modsettingenum.cpp
+++ b/plugins/DbEditorPP/src/modsettingenum.cpp
@@ -73,13 +73,10 @@ int CheckIfModuleIsEmptyProc(const char *, LPARAM)
return 1;
}
-int IsModuleEmpty(MCONTACT hContact, char* szModule)
+bool IsModuleEmpty(MCONTACT hContact, char* szModule)
{
DBCONTACTENUMSETTINGS dbces;
dbces.pfnEnumProc = CheckIfModuleIsEmptyProc;
dbces.szModule = szModule;
- int retVal = CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
- if (retVal >= 0)
- return 0;
- return 1;
+ return 0 > CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
}
diff --git a/plugins/DbEditorPP/src/modsettingenum.h b/plugins/DbEditorPP/src/modsettingenum.h
index ea37a0d00b..f46d991ac1 100644
--- a/plugins/DbEditorPP/src/modsettingenum.h
+++ b/plugins/DbEditorPP/src/modsettingenum.h
@@ -15,4 +15,4 @@ int EnumSettings(MCONTACT hContact, char *module, ModuleSettingLL *msll);
void FreeModuleSettingLL(ModuleSettingLL *msll);
-int IsModuleEmpty(MCONTACT hContact, char *szModule);
+bool IsModuleEmpty(MCONTACT hContact, char *szModule);
diff --git a/plugins/Dbx_mdb/src/dbsettings.cpp b/plugins/Dbx_mdb/src/dbsettings.cpp
index 99c6d006db..f9516e4a99 100644
--- a/plugins/Dbx_mdb/src/dbsettings.cpp
+++ b/plugins/Dbx_mdb/src/dbsettings.cpp
@@ -615,6 +615,9 @@ STDMETHODIMP_(BOOL) CDbxMdb::EnumContactSettings(MCONTACT contactID, DBCONTACTEN
}
}
+ if (arSettings.getCount() == 0)
+ return -1;
+
for (int i = 0; i < arSettings.getCount(); i++) {
result = (dbces->pfnEnumProc)(arSettings[i], dbces->lParam);
mir_free(arSettings[i]);