[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdecore/io
From: Andreas Hartmetz <ahartmetz () gmail ! com>
Date: 2009-08-12 16:18:43
Message-ID: 1250093923.235778.24880.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1010477 by ahartmetz:
Don't use static data after its destruction.
BUG: 203569
M +7 -3 kdebug.cpp
--- trunk/KDE/kdelibs/kdecore/io/kdebug.cpp #1010476:1010477
@@ -248,7 +248,7 @@
for (int i = 0; i < 8; i++) {
m_nullOutputYesNoCache[i] = -1;
}
-
+
QString filename(KStandardDirs::locate("config", QLatin1String("kdebug.areas")));
if (filename.isEmpty()) {
return;
@@ -704,8 +704,12 @@
// static
bool KDebug::hasNullOutput(QtMsgType type, int area)
{
+ if (kDebug_data.isDestroyed()) {
+ // kDebugStream() will generate a warning anyway, so we don't.
+ return false;
+ }
KDebugPrivate *const debugPriv = kDebug_data;
-
+
if (type == QtDebugMsg) {
int *entries = debugPriv->m_nullOutputYesNoCache;
for (int i = 0; i < 8; i += 2) {
@@ -725,7 +729,7 @@
entries[idx] = area;
entries[idx + 1] = ret;
}
-
+
return ret;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic