From d5d013b46ef2ea51172d364e8b32a82cb216056a Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 11 Apr 2010 00:59:07 +0200 Subject: 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 --- src/corelib/codecs/qtextcodec.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index c0aa342..1a08cca 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"); -- cgit v0.12