Merge branch 'hotfix-1.6.2' of https://github.com/besh81/nana into besh81-hotfix-1.6.2

This commit is contained in:
Jinhao 2018-12-06 22:57:28 +08:00
commit c99e738339

View File

@ -379,7 +379,15 @@ namespace nana{ namespace drawerbase
void trigger::icon(const nana::paint::image& img) void trigger::icon(const nana::paint::image& img)
{ {
if(img.empty()) return; if(img.empty())
{
if(attr_.icon)
{
delete attr_.icon;
attr_.icon = 0;
}
return;
}
if(nullptr == attr_.icon) if(nullptr == attr_.icon)
attr_.icon = new paint::image; attr_.icon = new paint::image;