diff -r 696bfeff199e -r fa1df4b99609 messagingappbase/msgeditor/appuisrc/MsgEditorAppUi.cpp --- a/messagingappbase/msgeditor/appuisrc/MsgEditorAppUi.cpp Thu Jul 15 18:34:37 2010 +0300 +++ b/messagingappbase/msgeditor/appuisrc/MsgEditorAppUi.cpp Thu Aug 19 09:51:11 2010 +0300 @@ -425,28 +425,31 @@ //We should not create iterator here navi pane iterator //will be refered in CMsgEditorAppUi - __ASSERT_DEBUG( iIterator != NULL, Panic( ENullPointer1 ) ); + // Next is ETrue if layout is EAknLayoutIdABRW, // EFalse if EAknLayoutIdELAF or EAknLayoutIdAPAC if ( AknLayoutUtils::LayoutMirrored() ) { aForward = !aForward; } - - if ( aForward ) - { - if ( iIterator->NextMessageExists() ) - { - ret = ETrue; - } - } - else - { - if ( iIterator->PreviousMessageExists() ) - { - ret = ETrue; - } - } + if(iIterator) + { + if ( aForward ) + { + if ( iIterator->NextMessageExists() ) + { + ret = ETrue; + } + } + else + { + if ( iIterator->PreviousMessageExists() ) + { + ret = ETrue; + } + } + } + } return ret; @@ -466,10 +469,11 @@ CMsgEditorDocument* doc = Document(); //We should not create iterator here, navi pane iterator //will be refered in CMsgEditorAppUi - __ASSERT_DEBUG( iIterator != NULL, Panic( ENullPointer1 ) ); - - aCurrentIndex = iIterator->CurrentMessageIndex(); - aMsgsInFolder = iIterator->MessagesInFolder(); + if(iIterator) + { + aCurrentIndex = iIterator->CurrentMessageIndex(); + aMsgsInFolder = iIterator->MessagesInFolder(); + } } else {