--- a/emailservices/emailserver/cmailhandlerplugin/src/cmailcpsif.cpp Tue Jan 26 11:45:42 2010 +0200
+++ b/emailservices/emailserver/cmailhandlerplugin/src/cmailcpsif.cpp Tue Feb 02 00:02:40 2010 +0200
@@ -776,13 +776,16 @@
{
// Widget removed from homescreen.
HBufC* cid = contentid.AllocLC();
- TInt widgetInstance = FindWidgetInstanceId(cid->Des());
- if (!iInactive[widgetInstance])
- {
- iMailCpsHandler->DissociateWidgetFromSettingL( cid->Des() );
- iInstIdList.Remove(widgetInstance);
- }
- iAllowedToPublish[widgetInstance] = EFalse;
+ TInt widgetInstance = FindWidgetInstanceId(cid->Des());
+ if (widgetInstance != KErrNotFound )
+ {
+ if (!iInactive[widgetInstance])
+ {
+ iMailCpsHandler->DissociateWidgetFromSettingL( cid->Des() );
+ iInstIdList.Remove(widgetInstance);
+ }
+ iAllowedToPublish[widgetInstance] = EFalse;
+ }
CleanupStack::PopAndDestroy( cid );
}
else if (trigger.Compare(KTriggerEmailUi) == 0)