-rw-r--r-- | core/apps/calibrate/main.cpp | 3 | ||||
-rw-r--r-- | core/opie-login/main.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/apps/calibrate/main.cpp b/core/apps/calibrate/main.cpp index 1c295eb..ec9b5ec 100644 --- a/core/apps/calibrate/main.cpp +++ b/core/apps/calibrate/main.cpp @@ -20,27 +20,28 @@ #include "calibrate.h" #include <qfile.h> #include <qpe/qpeapplication.h> #ifdef QWS #include <qwindowsystem_qws.h> #endif int main( int argc, char ** argv ) { QPEApplication a( argc, argv ); int retval = 0; #ifdef QWS - if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { + if ( QWSServer::mouseHandler() && + QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { #endif // Make sure calibration widget starts on top. Calibrate cal; a.setMainWidget(&cal); a.showMainWidget(&cal); return a.exec(); #ifdef QWS } #endif } diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp index 7dcb5f6..2103216 100644 --- a/core/opie-login/main.cpp +++ b/core/opie-login/main.cpp @@ -327,33 +327,34 @@ private: namespace Opie { extern int force_appearance; } // HACK to get around the force-style setting int login_main ( int argc, char **argv, pid_t ppid ) { QWSServer::setDesktopBackground( QImage() ); LoginApplication *app = new LoginApplication ( argc, argv, ppid ); Opie::force_appearance = 0; app-> setFont ( QFont ( "Helvetica", 10 )); app-> setStyle ( new QPEStyle ( )); ODevice::inst ( )-> setSoftSuspend ( true ); - if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { + if ( QWSServer::mouseHandler() && + QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { if ( !QFile::exists ( "/etc/pointercal" )) { // Make sure calibration widget starts on top. Calibrate *cal = new Calibrate; cal-> exec ( ); delete cal; } } LoginScreenSaver *saver = new LoginScreenSaver; saver-> setIntervals ( ); QWSServer::setScreenSaver ( saver ); saver-> restore ( ); LoginWindowImpl *lw = new LoginWindowImpl ( ); |