summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_symbian.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_symbian.cpp')
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 61541199db..8872045b7f 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -217,13 +217,13 @@ QTimerActiveObject::QTimerActiveObject(QEventDispatcherSymbian *dispatcher, Symb
QTimerActiveObject::~QTimerActiveObject()
{
Cancel();
+ m_rTimer.Close(); //close of null handle is safe
}
void QTimerActiveObject::DoCancel()
{
if (m_timerInfo->interval > 0) {
m_rTimer.Cancel();
- m_rTimer.Close();
} else {
if (iStatus.Int() == KRequestPending) {
TRequestStatus *status = &iStatus;
@@ -302,7 +302,9 @@ void QTimerActiveObject::Start()
CActiveScheduler::Add(this);
m_timerInfo->msLeft = m_timerInfo->interval;
if (m_timerInfo->interval > 0) {
- m_rTimer.CreateLocal();
+ if (!m_rTimer.Handle()) {
+ qt_symbian_throwIfError(m_rTimer.CreateLocal());
+ }
StartTimer();
} else {
iStatus = KRequestPending;