--- a/javauis/lcdui_akn/lcdui/src/CMIDUtils.cpp Tue May 25 12:34:19 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDUtils.cpp Wed Jun 09 09:34:07 2010 +0300
@@ -838,14 +838,14 @@
// ---------------------------------------------------------------------------
//
CMIDUtils::CMIDUtils(MMIDEnv& aEnv, CMIDUIManager* aUIManager)
- : iEnv(&aEnv)
- , iUIManager(aUIManager)
- , iScalingData()
- , iQwertyMode(EFalse)
- , iStickyKey(0)
- , iLastScanCode(0)
- , iModifier(0)
- , iScalingDataInitialized(EFalse)
+ : iEnv(&aEnv)
+ , iUIManager(aUIManager)
+ , iScalingData()
+ , iQwertyMode(EFalse)
+ , iStickyKey(0)
+ , iLastScanCode(0)
+ , iModifier(0)
+ , iScalingDataInitialized(EFalse)
{}
CMIDUtils::~CMIDUtils()
@@ -1202,7 +1202,7 @@
CMIDUtils::TScalingData CMIDUtils::GetScalingData()
{
- UpdateScalingData();
+ UpdateScalingData();
return iScalingData;
}
@@ -1215,7 +1215,13 @@
iScalingDataInitialized = ETrue;
// Get actual rect of screen without with eventual OSK.
- TRect screenRect =iEnv->Current()->GetCanvasRectFromLaf();
+ // Empty rect is OK.
+ MMIDDisplayable* current = iEnv->Current();
+ TRect screenRect;
+ if (current)
+ {
+ screenRect = current->GetCanvasRectFromLaf();
+ }
// Traslate of rect of screen into size
data.iScreenSize = screenRect.Size();