--- a/src/hbcore/image/hbframedrawer.cpp Fri Sep 17 08:32:10 2010 +0300
+++ b/src/hbcore/image/hbframedrawer.cpp Mon Oct 04 00:38:12 2010 +0300
@@ -980,18 +980,20 @@
}
/*!
-* Resets the MaskableIcon
-*/
+ * Drops the underlying icon(s). No need to send an unload req to server because the
+ * server drops the icon by itself in this case.
+ */
void HbFrameDrawerPrivate::resetMaskableIcon()
{
-#if defined(HB_SGIMAGE_ICON) || defined(HB_NVG_CS_ICON)
HbIconLoader *loader = HbIconLoader::global();
if (icon) {
//consolidated icon case
icon->decrementRefCount();
- if (icon->refCount() == 0 && icon->isCreatedOnServer()) {
+ if (icon->refCount() == 0) {
// remove the item from cache and delete the icon
- loader->removeItemInCache(icon->iconImpl());
+ if (loader) {
+ loader->removeItemInCache(icon->iconImpl());
+ }
icon->dispose();
}
icon = 0;
@@ -1002,8 +1004,10 @@
// remove the item in cache, dispose if needed.
foreach(HbMaskableIconImpl * impl, fallbackMaskableIconList) {
impl->decrementRefCount();
- if (impl->refCount() == 0 && impl->isCreatedOnServer()) {
- loader->removeItemInCache(impl->iconImpl());
+ if (impl->refCount() == 0) {
+ if (loader) {
+ loader->removeItemInCache(impl->iconImpl());
+ }
impl->dispose();
}
}
@@ -1011,7 +1015,6 @@
}
}
frameParts = 0;
-#endif
}
HbIconLoader::IconLoaderOptions HbFrameDrawerPrivate::iconLoaderOptions()