src/gui/painting/qwindowsurface_s60.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
child 7 f7bc934e204c
child 18 2f34d5167611
--- a/src/gui/painting/qwindowsurface_s60.cpp	Tue Jan 26 12:42:25 2010 +0200
+++ b/src/gui/painting/qwindowsurface_s60.cpp	Tue Feb 02 00:43:10 2010 +0200
@@ -4,7 +4,7 @@
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
-** This file is part of the QtGui of the Qt Toolkit.
+** This file is part of the QtGui module of the Qt Toolkit.
 **
 ** $QT_BEGIN_LICENSE:LGPL$
 ** No Commercial Usage
@@ -68,12 +68,14 @@
         mode = EColor16MA; // Try for transparency anyway
 
     // We create empty CFbsBitmap here -> it will be resized in setGeometry
-	CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap);	// CBase derived object needs check on new
+    CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap);	// CBase derived object needs check on new
     qt_symbian_throwIfError( bitmap->Create( TSize(0, 0), mode ) );
 	
     QS60PixmapData *data = new QS60PixmapData(QPixmapData::PixmapType);
-    data->fromSymbianBitmap(bitmap);
-    d_ptr->device = QPixmap(data);
+    if (data) {
+        data->fromSymbianBitmap(bitmap, true);
+        d_ptr->device = QPixmap(data);
+    }
         
     setStaticContentsSupport(true);
 }