From ec4fd914b3b34ae14b996fd525f3f6f9b68ddd9e Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Fri, 5 Jun 2009 10:30:46 +0200 Subject: 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. --- src/gui/painting/qcolormap_s60.cpp | 6 +----- 1 file changed, 1 insertion(+), 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) -- cgit v0.12