--- 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;
+}
-}