imagehandlingutilities/thumbnailmanager/plugins/image/src/thumbnailimagedecoderv2.cpp
changeset 15 7197e789b953
parent 14 2edacbf5d3f9
child 25 cb86b71cae0a
--- a/imagehandlingutilities/thumbnailmanager/plugins/image/src/thumbnailimagedecoderv2.cpp	Fri Mar 19 09:35:30 2010 +0200
+++ b/imagehandlingutilities/thumbnailmanager/plugins/image/src/thumbnailimagedecoderv2.cpp	Fri Apr 16 15:16:16 2010 +0300
@@ -84,8 +84,14 @@
         }
     
 	//set displaymode from global constants
-    User::LeaveIfError( iBitmap->Create( iDecoder->FrameInfo().iOverallSizeInPixels, iDecoder->FrameInfo().iFrameDisplayMode) );
-
+    TInt err = iBitmap->Create( iDecoder->FrameInfo().iOverallSizeInPixels, iDecoder->FrameInfo().iFrameDisplayMode);
+    if (err != KErrNone)
+        {
+        delete iBitmap;
+        iBitmap = NULL;
+        User::Leave(err);
+        }
+    
     iDecoder->Convert( &iStatus, * iBitmap );
     while ( iStatus == KErrUnderflow )
         {