Fix crash when the Iconwidget tries to display an already deleted resource Based on patch by Bruno P. Kinoshita
CCBUG:366741