From b68362e4ca9a176bde960f20dce76822e0a5dd0e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 17 Jan 2019 17:37:28 +0300 Subject: code cleaning --- plugins/MessageState/src/clist_extra.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/MessageState/src/clist_extra.cpp') diff --git a/plugins/MessageState/src/clist_extra.cpp b/plugins/MessageState/src/clist_extra.cpp index a4cf2e23f6..01a0f52739 100644 --- a/plugins/MessageState/src/clist_extra.cpp +++ b/plugins/MessageState/src/clist_extra.cpp @@ -4,12 +4,12 @@ HANDLE hExtraIcon = nullptr; int ExtraIconsApply(WPARAM hContact, LPARAM force) { - if (hContact == NULL) return 0; - - if (HasUnread(hContact) || force) - ExtraIcon_SetIcon(hExtraIcon, hContact, Icons[ICON_EXTRA].hIcolib); - else - ExtraIcon_Clear(hExtraIcon, hContact); + if (hContact != NULL) { + if (HasUnread(hContact) || force) + ExtraIcon_SetIcon(hExtraIcon, hContact, Icons[ICON_EXTRA].hIcolib); + else + ExtraIcon_Clear(hExtraIcon, hContact); + } return 0; } @@ -18,4 +18,4 @@ void InitClistExtraIcon() { hExtraIcon = ExtraIcon_RegisterIcolib("messagestate_unread", LPGEN("MessageState unread extra icon"), "clist_unread_icon"); HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, ExtraIconsApply); -} \ No newline at end of file +} -- cgit v1.2.3