summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprofiler/qml/TimeDisplay.qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-02-25 17:08:26 +0100
committerUlf Hermann <ulf.hermann@digia.com>2014-02-26 15:33:26 +0100
commit0b6b67ca073dd778d7ad803dab1fa2bcae4a8c8a (patch)
tree7310b4c1a5e6fdce97c50a42d1305a40821ef722 /src/plugins/qmlprofiler/qml/TimeDisplay.qml
parent9d1a1d2cdf63a2b1483f0439b5e0875da4e2889e (diff)
downloadqt-creator-0b6b67ca073dd778d7ad803dab1fa2bcae4a8c8a.tar.gz
QmlProfiler: Don't use the canvas context if it isn't ready
The documentation indicates that onPaint can actually be called while the context isn't ready. Change-Id: I32d861e016e5e990f3d940a35ec28956902041ba Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/plugins/qmlprofiler/qml/TimeDisplay.qml')
-rw-r--r--src/plugins/qmlprofiler/qml/TimeDisplay.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/qmlprofiler/qml/TimeDisplay.qml b/src/plugins/qmlprofiler/qml/TimeDisplay.qml
index 107a5678d9..12cecf435f 100644
--- a/src/plugins/qmlprofiler/qml/TimeDisplay.qml
+++ b/src/plugins/qmlprofiler/qml/TimeDisplay.qml
@@ -49,6 +49,8 @@ Canvas {
}
onPaint: {
+ if (context === null)
+ return; // canvas isn't ready
context.fillStyle = "white";
context.fillRect(0, 0, width, height);