summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-06-07 22:55:18 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-06-07 22:55:18 -0500
commit09dbd438c1fd7f3ee00eae33459bb7077fc3f9c2 (patch)
tree6b1e394aa6947ab6368d11913f08094a44019b01 /kdesktop/lock
parent5c3cd105bf9a3f6a1089e18e5edbe2b4ebff68a1 (diff)
downloadtdebase-09dbd438c1fd7f3ee00eae33459bb7077fc3f9c2.tar.gz
tdebase-09dbd438c1fd7f3ee00eae33459bb7077fc3f9c2.zip
Fix kdesktop_lock crash on mouse events when no dialog is displayed
This closes Bug 1008
Diffstat (limited to 'kdesktop/lock')
-rw-r--r--kdesktop/lock/lockprocess.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index da8a00373..1b9cc46b1 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -2391,7 +2391,7 @@ void LockProcess::slotMouseActivity(XEvent *event)
bool inDialog = 0;
XButtonEvent *be = (XButtonEvent *) event;
XMotionEvent *me = (XMotionEvent *) event;
- if (event->type == ButtonPress) {
+ if ((event->type == ButtonPress) && (mDialogs.first())) {
// Get geometry including window frame/titlebar
TQRect fgeom = mDialogs.first()->frameGeometry();
TQRect wgeom = mDialogs.first()->geometry();
@@ -2432,7 +2432,7 @@ void LockProcess::slotMouseActivity(XEvent *event)
int deltaY = me->y_root - m_mousePrevY;
m_dialogPrevX = m_dialogPrevX + deltaX;
m_dialogPrevY = m_dialogPrevY + deltaY;
- mDialogs.first()->move(m_dialogPrevX, m_dialogPrevY);
+ if (mDialogs.first()) mDialogs.first()->move(m_dialogPrevX, m_dialogPrevY);
m_mousePrevX = me->x_root;
m_mousePrevY = me->y_root;