diff options
Diffstat (limited to 'plugins/UserInfoEx/src')
-rw-r--r-- | plugins/UserInfoEx/src/psp_base.cpp | 16 |
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);
+ }
}
|