diff -r 3aa07f06a4b7 -r 31d52bbe209c windowing/windowserver/nga/SERVER/EVENT.CPP --- a/windowing/windowserver/nga/SERVER/EVENT.CPP Tue Apr 20 16:38:10 2010 +0100 +++ b/windowing/windowserver/nga/SERVER/EVENT.CPP Fri Apr 23 14:57:14 2010 +0100 @@ -1021,7 +1021,9 @@ case TRawEvent::EKeyDown: { _LIT(KWSERVDebugLogKeyDownArrival,"Key down arrives %d"); - if(CDebugBar* dbg = CWsTop::Screen()->DebugBar()) + CScreen* screen = CWsTop::Screen(); + WS_ASSERT_ALWAYS(screen, EWsPanicNoScreen); + if(CDebugBar* dbg = screen->DebugBar()) dbg->OnKeyEvent(); if (wsDebugLog) wsDebugLog->MiscMessage(CDebugLogBase::ELogEverything,KWSERVDebugLogKeyDownArrival,aRawEvent.ScanCode()); @@ -1037,7 +1039,9 @@ case TRawEvent::EKeyUp: { _LIT(KWSERVDebugLogKeyUpArrival,"Key up arrives %d"); - if(CDebugBar* dbg = CWsTop::Screen()->DebugBar()) + CScreen* screen = CWsTop::Screen(); + WS_ASSERT_ALWAYS(screen, EWsPanicNoScreen); + if(CDebugBar* dbg = screen->DebugBar()) dbg->OnKeyEvent(); if (wsDebugLog) wsDebugLog->MiscMessage(CDebugLogBase::ELogEverything,KWSERVDebugLogKeyUpArrival,aRawEvent.ScanCode());