diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-06-05 08:30:46 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-06-05 08:30:46 (GMT) |
commit | ec4fd914b3b34ae14b996fd525f3f6f9b68ddd9e (patch) | |
tree | 305cd05282b3d7ee69ad98908484363e62200c28 /src/gui/painting | |
parent | fd6e80b7cc36ebc111d062301ba8bfca5e6e6f50 (diff) | |
download | Qt-ec4fd914b3b34ae14b996fd525f3f6f9b68ddd9e.zip Qt-ec4fd914b3b34ae14b996fd525f3f6f9b68ddd9e.tar.gz Qt-ec4fd914b3b34ae14b996fd525f3f6f9b68ddd9e.tar.bz2 |
Make QColormap::instance() not crash.
This doesn't really need a static instance lying around and this
current implementation crashes since we never call the constructor.
Just recreate it on the fly when instance() is called which apparently
is never.
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qcolormap_s60.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gui/painting/qcolormap_s60.cpp b/src/gui/painting/qcolormap_s60.cpp index c21eba9..1b58598 100644 --- a/src/gui/painting/qcolormap_s60.cpp +++ b/src/gui/painting/qcolormap_s60.cpp @@ -53,22 +53,18 @@ public: QAtomicInt ref; }; -static QColormap *qt_symbian_color_map = 0; void QColormap::initialize() { - qt_symbian_color_map = new QColormap; } void QColormap::cleanup() { - delete qt_symbian_color_map; - qt_symbian_color_map = 0; } QColormap QColormap::instance(int) { - return *qt_symbian_color_map; + return QColormap(); } QColormap::QColormap() : d(new QColormapPrivate) |