diff options
Diffstat (limited to 'plugins/UserInfoEx/src/classPsTreeItem.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/classPsTreeItem.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index 2231f7c157..f5d6d28d63 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -274,21 +274,21 @@ int CPsTreeItem::ItemLabel(const BYTE bReadDBValue) **/
HICON CPsTreeItem::ProtoIcon()
{
+ if (!_pszName)
+ return NULL;
+
PROTOACCOUNT **pa;
int ProtoCount;
- if (!ProtoEnumAccounts(&ProtoCount, &pa)) {
- if (_pszName) {
- for (int i = 0; i < ProtoCount; i++) {
- if (!mir_tcsnicmp(pa[i]->tszAccountName, _A2T(_pszName), mir_tstrlen(pa[i]->tszAccountName))) {
- CHAR szIconID[MAX_PATH];
- mir_snprintf(szIconID, SIZEOF(szIconID), "core_status_%s1", pa[i]->szModuleName);
- HICON hIco = IcoLib_GetIcon(szIconID);
- if (!hIco)
- hIco = (HICON)CallProtoService(pa[i]->szModuleName, PS_LOADICON, PLI_PROTOCOL, NULL);
-
- return hIco;
- }
- }
+ Proto_EnumAccounts(&ProtoCount, &pa);
+ for (int i = 0; i < ProtoCount; i++) {
+ if (!mir_tcsnicmp(pa[i]->tszAccountName, _A2T(_pszName), mir_tstrlen(pa[i]->tszAccountName))) {
+ CHAR szIconID[MAX_PATH];
+ mir_snprintf(szIconID, SIZEOF(szIconID), "core_status_%s1", pa[i]->szModuleName);
+ HICON hIco = IcoLib_GetIcon(szIconID);
+ if (!hIco)
+ hIco = (HICON)CallProtoService(pa[i]->szModuleName, PS_LOADICON, PLI_PROTOCOL, NULL);
+
+ return hIco;
}
}
return NULL;
|