summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChow Loong Jin <hyperair@ubuntu.com>2010-09-26 22:49:52 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-09-26 22:49:52 +0800
commit7f1e319b0e0246a3fdf5106ef93ef58b3fabb48d (patch)
tree782a94edfb9f79d5622a1f0c67c3a1b122340b32
parent54f2523f1706eb66b53bbd00087320dc02d4bd9d (diff)
downloadworkarounds-7f1e319b0e0246a3fdf5106ef93ef58b3fabb48d.tar.gz
workarounds-7f1e319b0e0246a3fdf5106ef93ef58b3fabb48d.tar.bz2
[PATCH] Return "" instead of NULL in getRoleAtom.
The return value of NULL is implicitly converted into CompString (return type of getRoleAtom), and throws a logic_error causing Compiz to SIGBART.
-rw-r--r--src/workarounds.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/workarounds.cpp b/src/workarounds.cpp
index 7965c60..94b07d4 100644
--- a/src/workarounds.cpp
+++ b/src/workarounds.cpp
@@ -436,12 +436,12 @@ WorkaroundsWindow::getRoleAtom ()
(unsigned char **) &str);
if (result != Success)
- return NULL;
+ return "";
if (type != XA_STRING)
{
XFree (str);
- return NULL;
+ return "";
}
retval = CompString ((const char *) str);