From 69041fbb5ce0bd1ceb1e5f871f5b7bc0c0980ab2 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 18 Nov 2013 13:25:16 +0100 Subject: [PATCH] QmlProfiler: Don't try to paint things in pixmap of negative size. In certain conditions the area covered by the canvas can have a negative size. This patch handles that case gracefully. Change-Id: I952edfa5bd0f8b42ce69356106f2e0f326dceeb7 Reviewed-by: Kai Koehne --- src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp b/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp index 2927d8f27f..9107e53d48 100644 --- a/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp +++ b/src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp @@ -69,7 +69,7 @@ void QmlProfilerCanvas::draw() m_context2d->reset(); m_context2d->setSize(width(), height()); - if (width() != 0 && height() != 0) + if (width() > 0 && height() > 0) emit drawRegion(m_context2d, QRect(0, 0, width(), height())); update(); } -- GitLab