[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdesdk/lokalize/src/catalog/gettext
From:       Nick Shaforostoff <shafff () ukr ! net>
Date:       2011-09-01 21:16:17
Message-ID: 20110901211617.B7861AC87F () svn ! kde ! org
[Download RAW message or body]

SVN commit 1250834 by shaforo:

BUG: 281033
fix crash due to qregexp being non thread safe


 M  +3 -0      catalogitem.cpp  


--- trunk/KDE/kdesdk/lokalize/src/catalog/gettext/catalogitem.cpp #1250833:1250834
@@ -37,6 +37,7 @@
 #include "catalogitem_private.h"
 
 #include <kdebug.h>
+#include <QMutexLocker>
 
 using namespace GettextCatalog;
 
@@ -179,6 +180,8 @@
 
 void CatalogItem::setComment(const QString& com)
 {
+    static QMutex reMutex;
+    QMutexLocker reLock(&reMutex); //avoid crash #281033
     static QRegExp fuzzyRegExp("((?:^|\n)#(?:,[^,]*)*),\\s*fuzzy");
     d->_fuzzyCached=com.contains( fuzzyRegExp );
     d->_comment=com.toUtf8();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic