src/hbcore/image/hbiconsource.cpp
changeset 3 11d3954df52a
parent 1 f7ac710697a9
child 5 627c4a0fd0e7
--- a/src/hbcore/image/hbiconsource.cpp	Fri May 14 16:09:54 2010 +0300
+++ b/src/hbcore/image/hbiconsource.cpp	Thu May 27 13:10:59 2010 +0300
@@ -274,16 +274,16 @@
 QByteArray* HbIconSource::byteArray()
 {
     if (!mByteArray) {
-    #ifdef HB_NVG_CS_ICON
+#ifdef HB_NVG_CS_ICON
         QFile file(mFilename);
         if (!file.open(QIODevice::NotOpen | QIODevice::ReadOnly)) {
             return 0;
         }
-        mByteArray = new QByteArray (file.readAll());
-    #endif//nvg 
+        mByteArray = new QByteArray(file.readAll());
+#endif
     }
     
-    if (!mByteArray->isEmpty()) {
+    if (mByteArray && !mByteArray->isEmpty()) {
         return mByteArray;
     } else {
         return 0;