summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Endrodi <ext-adam.endrodi@nokia.com>2010-11-03 13:52:38 +0200
committerAdam Endrodi <ext-adam.endrodi@nokia.com>2010-11-04 09:53:00 +0200
commit968406726621da2d399a7d02c552080a9a1e3ed5 (patch)
tree84a17d9f396b7185566dbe0a45623013c77f22b9
parentcab913256278447581dff828c30ba0e0284253c9 (diff)
crash fix in dumpState()
* src/mcompositemanager.cpp (MCompositeManager::dumpState): don't crash if a window doesn't have a name/class
-rw-r--r--src/mcompositemanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mcompositemanager.cpp b/src/mcompositemanager.cpp
index aa57243..9b81c54 100644
--- a/src/mcompositemanager.cpp
+++ b/src/mcompositemanager.cpp
@@ -3582,6 +3582,7 @@ void MCompositeManager::dumpState(const char *heading)
if (!name) {
XClassHint cls;
+ cls.res_name = cls.res_class = NULL;
XGetClassHint(QX11Info::display(), cw->window(), &cls);
if (!(name = cls.res_name))
name = cls.res_class;
@@ -3590,7 +3591,8 @@ void MCompositeManager::dumpState(const char *heading)
}
qDebug(" ptr %p == xwin 0x%lx%s: %s", cw, cw->window(),
- cw->isValid() ? "" : " (not valid anymore)", name);
+ cw->isValid() ? "" : " (not valid anymore)",
+ name ? name : "[noname]");
qDebug(" mapped: %s, newly mapped: %s",
yn[cw->isMapped()], yn[cw->isNewlyMapped()]);
qDebug(" visible: %s, direct rendered: %s",