summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-02-09 12:15:01 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-02-09 12:15:01 +0300
commitaa3f51fd00213fa82a2d7ad092e05319f6a4be90 (patch)
tree1170a941c56d2b6bd19f436c66bdaa75d8710cb7 /plugins/UserInfoEx
parentab53bb4692c05cff1f1842dbbea887876ef550c5 (diff)
code cleaning
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r--plugins/UserInfoEx/src/psp_base.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/UserInfoEx/src/psp_base.cpp b/plugins/UserInfoEx/src/psp_base.cpp
index 514e12a992..8b7824151c 100644
--- a/plugins/UserInfoEx/src/psp_base.cpp
+++ b/plugins/UserInfoEx/src/psp_base.cpp
@@ -109,13 +109,11 @@ const char *PSPBaseDlg::GetBaseProto() const
void PSPBaseDlg::UpdateCountryIcon(CCtrlCombo &pCombo)
{
- LPIDSTRLIST pd = (LPIDSTRLIST)pCombo.GetCurData();
- if (pd == nullptr)
- return;
-
- auto *pCtrl = FindControl(ICO_COUNTRY);
- HICON hIcon = LoadFlagIcon(pd->nID);
- HICON hOld = Static_SetIcon(pCtrl->GetHwnd(), hIcon);
- pCtrl->Show(hIcon != 0);
- IcoLib_ReleaseIcon(hOld);
+ if (LPIDSTRLIST pd = (LPIDSTRLIST)pCombo.GetCurData()) {
+ auto *pCtrl = FindControl(ICO_COUNTRY);
+ HICON hIcon = LoadFlagIcon(pd->nID);
+ HICON hOld = Static_SetIcon(pCtrl->GetHwnd(), hIcon);
+ pCtrl->Show(hIcon != 0);
+ IcoLib_ReleaseIcon(hOld);
+ }
}