diff options
author | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-12-19 11:36:56 (GMT) |
---|---|---|
committer | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-12-19 11:36:56 (GMT) |
commit | dae052cb11c0018121f2c4028aed9db17769fd77 (patch) | |
tree | 741fe15230ea3f90cb7d2a63610e4d5ce1568d3d /src | |
parent | 69df8bf72da01f194bac66e80417b6483d00decb (diff) | |
download | Qt-dae052cb11c0018121f2c4028aed9db17769fd77.zip Qt-dae052cb11c0018121f2c4028aed9db17769fd77.tar.gz Qt-dae052cb11c0018121f2c4028aed9db17769fd77.tar.bz2 |
Fix m_longTapDetector causing crash.
GL shared widget calls null poiter m_longTapDetector.
These call shouldn't happen because GL shared widget
isn't part of UI stack anymore. This patch adds null
pointer checks
Task-number: QTBUG-23252
Reviewed-by: TRUSTME
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 48767b8..1518d2d 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -556,7 +556,7 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop) SetFocusing(true); m_longTapDetector = QLongTapTimer::NewL(this); m_doubleClickTimer.invalidate(); - + DrawableWindow()->SetPointerGrab(ETrue); } } @@ -600,7 +600,7 @@ QSymbianControl::~QSymbianControl() } QT_CATCH(const std::exception&) { // ignore exceptions, nothing can be done } - + if (S60->curWin == this) S60->curWin = 0; if (!QApplicationPrivate::is_app_closing) { @@ -830,7 +830,8 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) const TPointerEvent *pointerEvent = eventData.Pointer(i); const TAdvancedPointerEvent *advEvent = pointerEvent->AdvancedPointerEvent(); if (!advEvent || advEvent->PointerNumber() == 0) { - m_longTapDetector->PointerEventL(*pointerEvent); + if (m_longTapDetector) + m_longTapDetector->PointerEventL(*pointerEvent); QT_TRYCATCH_LEAVING(HandlePointerEvent(*pointerEvent)); } } @@ -847,8 +848,8 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) } } #endif - - m_longTapDetector->PointerEventL(pEvent); + if (m_longTapDetector) + m_longTapDetector->PointerEventL(pEvent); QT_TRYCATCH_LEAVING(HandlePointerEvent(pEvent)); } @@ -1718,7 +1719,8 @@ void QSymbianControl::HandleResourceChange(int resourceType) } void QSymbianControl::CancelLongTapTimer() { - m_longTapDetector->Cancel(); + if (m_longTapDetector) + m_longTapDetector->Cancel(); } TTypeUid::Ptr QSymbianControl::MopSupplyObject(TTypeUid id) |