author | zecke <zecke> | 2003-10-04 07:28:05 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-10-04 07:28:05 (UTC) |
commit | 23f729eb7487ad189591c3b0c9af9d3afecd3b91 (patch) (unidiff) | |
tree | 83b7efa5996ffcbf22f36b370505eb11fdece4ff /core/apps/calibrate/main.cpp | |
parent | 364d30ca7c212a531b79bb7cbceb8af7a0130f2c (diff) | |
download | opie-23f729eb7487ad189591c3b0c9af9d3afecd3b91.zip opie-23f729eb7487ad189591c3b0c9af9d3afecd3b91.tar.gz opie-23f729eb7487ad189591c3b0c9af9d3afecd3b91.tar.bz2 |
Avoid crashing on no mouse driver
Diffstat (limited to 'core/apps/calibrate/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/calibrate/main.cpp | 3 |
1 files changed, 2 insertions, 1 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 @@ | |||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "calibrate.h" | 21 | #include "calibrate.h" |
22 | 22 | ||
23 | #include <qfile.h> | 23 | #include <qfile.h> |
24 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
25 | 25 | ||
26 | #ifdef QWS | 26 | #ifdef QWS |
27 | #include <qwindowsystem_qws.h> | 27 | #include <qwindowsystem_qws.h> |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | int main( int argc, char ** argv ) | 30 | int main( int argc, char ** argv ) |
31 | { | 31 | { |
32 | QPEApplication a( argc, argv ); | 32 | QPEApplication a( argc, argv ); |
33 | int retval = 0; | 33 | int retval = 0; |
34 | 34 | ||
35 | #ifdef QWS | 35 | #ifdef QWS |
36 | if ( QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { | 36 | if ( QWSServer::mouseHandler() && |
37 | QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { | ||
37 | #endif | 38 | #endif |
38 | // Make sure calibration widget starts on top. | 39 | // Make sure calibration widget starts on top. |
39 | Calibrate cal; | 40 | Calibrate cal; |
40 | a.setMainWidget(&cal); | 41 | a.setMainWidget(&cal); |
41 | a.showMainWidget(&cal); | 42 | a.showMainWidget(&cal); |
42 | return a.exec(); | 43 | return a.exec(); |
43 | #ifdef QWS | 44 | #ifdef QWS |
44 | } | 45 | } |
45 | #endif | 46 | #endif |
46 | } | 47 | } |