summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qicon.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2013-04-23 08:41:08 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-24 06:49:44 +0200
commit9d7fe3eb3dcb71926b3db65df835d45fc431eebb (patch)
tree5b64c1eb1e17e5511f5c7744a192aa3a70114685 /src/gui/image/qicon.cpp
parentaf35ee291a1bbbc8627f9a17f7e104898d49b138 (diff)
Fixed crashes relating to SVG icons.
Creating a second QFactoryLoader for the same plugins seems to trigger an unload of the plugins loaded by the first factory loader. The QIconEngine created by the SVG icon plugin thus gets an invalid virtual table pointer, which causes a crash when attempting to call any virtual function in the QIconEngine (pixmap(), the virtual destructor, etc). Reusing a single QFactoryLoader instead fixes the crash. Task-number: QTBUG-30496 Change-Id: I80c5fa8b52ab9b0db68499f8c37fad14a1ac4f3c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/gui/image/qicon.cpp')
-rw-r--r--src/gui/image/qicon.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index d73cd0aa57..45eda78397 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -483,6 +483,11 @@ void QPixmapIconEngine::virtual_hook(int id, void *data)
#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QIconEngineFactoryInterface_iid, QLatin1String("/iconengines"), Qt::CaseInsensitive))
+
+QFactoryLoader *qt_iconEngineFactoryLoader()
+{
+ return loader();
+}
#endif