summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpainter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 1258d6b..cde6a2d 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -7503,15 +7503,14 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset)
{
Q_ASSERT(device != 0);
- if (*globalRedirectionAtomic() == 0)
- return 0;
-
if (device->devType() == QInternal::Widget) {
const QWidgetPrivate *widgetPrivate = static_cast<const QWidget *>(device)->d_func();
if (widgetPrivate->redirectDev)
return widgetPrivate->redirected(offset);
}
+ if (*globalRedirectionAtomic() == 0)
+ return 0;
QMutexLocker locker(globalRedirectionsMutex());
QPaintDeviceRedirectionList *redirections = globalRedirections();