summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/apps/calibrate/main.cpp3
-rw-r--r--core/opie-login/main.cpp3
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
@@ -12,35 +12,36 @@
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#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
@@ -319,49 +319,50 @@ public:
private:
bool m_lcd_status;
int m_backlight_bright;
bool m_backlight_forcedoff;
};
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 ( );
app-> setMainWidget ( lw );
lw-> setGeometry ( 0, 0, app-> desktop ( )-> width ( ), app-> desktop ( )-> height ( ));
lw-> show ( );
int rc = app-> exec ( );
ODevice::inst ( )-> setSoftSuspend ( false );