summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/qt/ContextShadowQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/qt/ContextShadowQt.cpp')
-rw-r--r--Source/WebCore/platform/graphics/qt/ContextShadowQt.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/qt/ContextShadowQt.cpp b/Source/WebCore/platform/graphics/qt/ContextShadowQt.cpp
index 37d6b44..9eb31a7 100644
--- a/Source/WebCore/platform/graphics/qt/ContextShadowQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/ContextShadowQt.cpp
@@ -57,7 +57,7 @@ private:
ShadowBuffer::ShadowBuffer(QObject* parent)
: QObject(parent)
- , timerId(0)
+ , timerId(-1)
{
}
@@ -89,7 +89,8 @@ QImage* ShadowBuffer::scratchImage(const QSize& size)
void ShadowBuffer::schedulePurge()
{
static const double BufferPurgeDelay = 2; // seconds
- killTimer(timerId);
+ if (timerId >= 0)
+ killTimer(timerId);
timerId = startTimer(BufferPurgeDelay * 1000);
}