activityfw/activitydatabase/hsactivitydbserver/src/activitythumbnailtask.cpp
changeset 80 397d00875918
parent 73 4bc7b118b3df
child 83 156f692b1687
child 96 5d243a69bdda
--- a/activityfw/activitydatabase/hsactivitydbserver/src/activitythumbnailtask.cpp	Fri May 14 16:10:06 2010 +0300
+++ b/activityfw/activitydatabase/hsactivitydbserver/src/activitythumbnailtask.cpp	Thu May 27 13:11:12 2010 +0300
@@ -75,14 +75,7 @@
     mMsg.ReadL(2, path);
     mime.CreateL(mMsg.GetDesLengthL(3));
     mMsg.ReadL(3, mime);
-    if(0 >= width() || 
-       0 >=height() ||
-       0 >= path.Length() ||
-       0 >= mime.Length()
-       ) {
-       User::Leave(KErrCorrupt);
-    }
-    
+
     mService = CGraphicsSalingHandler::NewL(*this, 
                                             session, 
                                             path, 
@@ -100,12 +93,15 @@
 //
 void CActivityThumbnailTask::ImageReadyCallBack(TInt error,const CFbsBitmap *bitmap)
 {
-    if (KErrNone == error) {
+    if (EFalse == mMsg.IsNull() &&
+        KErrNone == error) {
         mMsg.Write(0, TPckgBuf<int>(const_cast<CFbsBitmap*>(bitmap)->Handle()));
         mMsg.Write(1, TPckgBuf<void *>(this));
         mMsg.Complete(error);
     } else {
-        mMsg.Complete(error);
+        if (EFalse == mMsg.IsNull()) {
+         mMsg.Complete(error);
+        }
         mStorage.Pop(this);
         delete this;
     }
@@ -124,7 +120,7 @@
 //
 // -----------------------------------------------------------------------------
 //
-void CActivityThumbnailTask::BroadcastReceivedL(const RMessage2& )
+void CActivityThumbnailTask::BroadcastReceivedL(const RMessage2&)
 {
 }