delete __pContentBgEffectDisabledBitmap;
__pContentBgEffectDisabledBitmap = null;
+
+ if (__pContentProvider)
+ {
+ __pContentProvider->Destroy();
+ __pContentProvider = null;
+ }
}
_EditDatePresenter*
}
Canvas* pCanvas = __pEditDate->GetCanvasN();
- SysAssertf((pCanvas != null), "Failed to get canvas.");
+ r = GetLastResult();
+ SysTryReturn(NID_UI_CTRL, (pCanvas != null), r, r, "[%s] Propagating. Failed to get canvas.", GetErrorMessage(r));
pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
pCanvas->Clear();
r = GetLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, (pEditDateElement != null), r, "[%s] Propagating.", GetErrorMessage(r));
- pEditDateElement->DetachChild(*__pContentProvider);
- __pContentProvider->Destroy();
- __pContentProvider = null;
+ //__pContentProvider will be destroyed in destructor when OnFormBackRequested() callback is received
+ if (__pContentProvider)
+ {
+ pEditDateElement->DetachChild(*__pContentProvider);
+ __pContentProvider->Destroy();
+ __pContentProvider = null;
+ Draw();
+ }
- Draw();
return;
}