src/hbservers/hbthemeserver/hbsgimageiconprocessor_p.cpp
changeset 1 f7ac710697a9
parent 0 16d8024aca5e
child 2 06ff229162e9
--- a/src/hbservers/hbthemeserver/hbsgimageiconprocessor_p.cpp	Mon Apr 19 14:02:13 2010 +0300
+++ b/src/hbservers/hbthemeserver/hbsgimageiconprocessor_p.cpp	Mon May 03 12:48:33 2010 +0300
@@ -104,7 +104,11 @@
     data.type = INVALID_FORMAT;
 
     HbIconSource *source = HbThemeServerUtils::getIconSource(iconPath);
-    byteArray = *(source->byteArray());
+    QByteArray *sourceByteArray = source->byteArray();
+    if( !sourceByteArray ) {
+        return false;
+    }
+    byteArray = *sourceByteArray;
     QSizeF size = source->defaultSize();
     defaultSize = size.toSize();
     QSizeF renderSize(defaultSize);
@@ -285,7 +289,11 @@
 
 
             HbIconSource *source = HbThemeServerUtils::getIconSource(multiPieceIconParams.multiPartIconList[i]);
-            byteArray = *(source->byteArray());
+            QByteArray *sourceByteArray = source->byteArray();
+            if( !sourceByteArray ) {
+                return false;
+            }
+            byteArray = *sourceByteArray;
             success = renderNvg(byteArray, QRect(position,
                                                  multiPieceIconParams.multiPartIconData.pixmapSizes[i]), (Qt::AspectRatioMode)multiPieceIconParams.aspectRatioMode,
                                 mirrored);
@@ -320,9 +328,9 @@
 
     NvgAspectRatioSettings settings = mapKeyAspectRatioToNvgAspectRatio(aspectRatioMode);
     nvgEngine.setPreserveAspectRatio(settings.nvgAlignStatusAndAspectRatio, settings.type);
-    nvgEngine.setMirroringMode(mirrored);
+    nvgEngine.enableMirroring(mirrored);
 
-    HbNvgEngine::NvgErrorType errorType = nvgEngine.drawNvg(byteArray, size);
+    HbNvgEngine::HbNvgErrorType errorType = nvgEngine.drawNvg(byteArray, size);
     return errorType == HbNvgEngine::NvgErrNone;
+}
 
-}