summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
Side-by-side diff
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 2bd7cbe..953f9d0 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -164,13 +164,13 @@ public:
{ }
QCString channel;
QCString message;
QByteArray data;
};
- QWidget* qpe_main_widget;
+ QGuardedPtr<QWidget> qpe_main_widget;
QGuardedPtr<QWidget> lastraised;
QQueue<QCopRec> qcopq;
QString styleName;
QString decorationName;
void enqueueQCop( const QCString &ch, const QCString &msg,
@@ -316,12 +316,15 @@ public:
return TRUE;
}
static void store_widget_rect(QWidget *w, QString &app)
{
+ if( !w )
+ return;
+
// 350 is the trigger in qwsdefaultdecoration for providing a resize button
if ( qApp->desktop()->width() <= 350 )
return;
// we use these to map the offset of geometry and pos. ( we can only use normalGeometry to
// get the non-maximized version, so we have to do it the hard way )
int offsetX = w->x() - w->geometry().left();