summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2010-04-11 00:59:07 +0200
committerLars Knoll <lars.knoll@nokia.com>2010-04-11 01:18:18 +0200
commitd5d013b46ef2ea51172d364e8b32a82cb216056a (patch)
treec66e846b2e63b19448e094dbc2fab46b4c409d7b /src/corelib/codecs
parent698c7a45d156e9f85afb870ffcd5b99d08d8677b (diff)
Fix a crash with global static objects
When global static objects use text codecs in their constructor or destructor we would crash on symbian, as the symbian codec was trying to use a non existing cleanup stack. Task-number: QT-3255 Reviewed-by: Espen Riskedal
Diffstat (limited to 'src/corelib/codecs')
-rw-r--r--src/corelib/codecs/qtextcodec.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index c0aa342235..1a08cca1cb 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -671,6 +671,11 @@ static void setup()
if (all)
return;
+#ifdef Q_OS_SYMBIAN
+ if (User::TrapHandler() == NULL)
+ return;
+#endif
+
#ifdef Q_DEBUG_TEXTCODEC
if (destroying_is_ok)
qWarning("QTextCodec: Creating new codec during codec cleanup");