phonebookui/Phonebook2/UIControls/src/CPbk2ThumbnailManager.cpp
branchRCL_3
changeset 6 e8e3147d53eb
parent 3 04ab22b956c2
child 9 0d28c1c5b6dd
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ThumbnailManager.cpp	Fri Mar 12 15:41:25 2010 +0200
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ThumbnailManager.cpp	Mon Mar 15 12:39:26 2010 +0200
@@ -355,6 +355,12 @@
 //
 CPbk2ThumbnailManager::~CPbk2ThumbnailManager()
 	{
+    if( iView )
+        {
+        iView->RemoveObserver(*this );
+        iView->RemoveStackObserver( *this ); 
+        }    
+    
 	delete iInProgressItemToBeRemoved;
 	delete iThumbOperation;
     delete iManager;
@@ -590,6 +596,12 @@
 //
 void CPbk2ThumbnailManager::SetContactViewL( MPbk2FilteredViewStack* aView )
     {
+    if( iView )
+        {
+        iView->RemoveObserver(*this );
+        iView->RemoveStackObserver( *this ); 
+        }    
+    
     iView = aView;
     if( iView )
         {
@@ -859,7 +871,7 @@
 	// contact has no image or error occured, move to next contact
 	if( err )
 		{
-		if ( iLoadingQueue.Count() )
+		if ( !iInProgressItemToBeRemoved && iLoadingQueue.Count() )
 		    {
             if( iObserver )
                 {