diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-02-01 08:03:48 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-02-01 08:03:48 (GMT) |
commit | 465a63d00c2294641539af820435a9a4315f0251 (patch) | |
tree | eade5967fb64f4ffb2c9d381f46ef867a467fb5f /src | |
parent | d98d31ca34a84a03dbac20fbf1dc88c0f8fd93cb (diff) | |
download | Qt-465a63d00c2294641539af820435a9a4315f0251.zip Qt-465a63d00c2294641539af820435a9a4315f0251.tar.gz Qt-465a63d00c2294641539af820435a9a4315f0251.tar.bz2 |
Don't crash when running Qt on KDE with Oxygen style.
It crashed on application exit because of the order of Q_GLOBAL_STATICs
are not defined if the global statics are in different modules. Thus,
the globalRedirectionAtomic was destroyed first, then the
K_GLOBAL_STATIC(OxygenHelper, ...) got destroyed. Since the
OxygeneHelper contained a QCache of pixmaps it would eventually call
~QPixmap() and reference the destroyed globalRedirectionAtomic....
Task-number: QTBUG-7734
Reviewed-by: gunnar
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index cde6a2d..0f28f7a 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7529,7 +7529,7 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) void qt_painter_removePaintDevice(QPaintDevice *dev) { - if (*globalRedirectionAtomic() == 0) + if (!globalRedirectionAtomic() || *globalRedirectionAtomic() == 0) return; QMutex *mutex = 0; |