diff -r aabf2c525e0f -r 9f56a4e1b8ab uifw/AvKon/src/AknPreviewPopUp.cpp --- a/uifw/AvKon/src/AknPreviewPopUp.cpp Fri Mar 12 15:43:43 2010 +0200 +++ b/uifw/AvKon/src/AknPreviewPopUp.cpp Mon Mar 15 12:41:34 2010 +0200 @@ -67,7 +67,8 @@ : iContent( aContent ), iController( aController ), iFlags( aStyle ), - iAllowUpEvent(EFalse) + iAllowUpEvent(EFalse), + iIsDeleted(0) { GfxTransEffect::Register( this, KGfxPreviewPopupControlUid ); } @@ -79,6 +80,12 @@ CAknPreviewPopUp::~CAknPreviewPopUp() { AKNTASHOOK_REMOVE(); + + if( iIsDeleted ) + { + *iIsDeleted = ETrue ; + iIsDeleted = 0 ; + } GfxTransEffect::Deregister( this ); @@ -509,6 +516,9 @@ // void CAknPreviewPopUp::HandlePointerEventL( const TPointerEvent& aPointerEvent ) { + TBool isDelete = EFalse; + iIsDeleted = &isDelete; + if ( AknLayoutUtils::PenEnabled() ) { iCloseMenu = EFalse; @@ -522,6 +532,10 @@ { iAllowUpEvent = ETrue; CCoeControl::HandlePointerEventL( aPointerEvent ); + if( isDelete ) + { + return; + } if ( !( iFlags & CAknPreviewPopUpController::EPermanentMode ) && aPointerEvent.iType == TPointerEvent::EButton1Up && IsVisible() ) { // if pointer up is already redirected to the content, but the popup is still visible, @@ -593,6 +607,10 @@ (aPointerEvent.iType == TPointerEvent::EButton1Up && iAllowUpEvent ) ) { CCoeControl::HandlePointerEventL( aPointerEvent ); + if( isDelete ) + { + return; + } } } else @@ -601,6 +619,10 @@ aPointerEvent.iType == TPointerEvent::EButtonRepeat ) { CCoeControl::HandlePointerEventL( aPointerEvent ); + if( isDelete ) + { + return; + } } } @@ -610,6 +632,8 @@ iAllowUpEvent = EFalse; } } + + iIsDeleted = 0; } // -----------------------------------------------------------------------------