summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-04-11 22:45:57 +0000
committersabetts <sabetts>2003-04-11 22:45:57 +0000
commitd3cb4e8408cde0e426a7c8a4c52a98af4884bbbf (patch)
treee0fefd4142a00df22ce4faecba978b29a73e0083
parent55fdbf1ec5ef78bf8dd6f352c195a0c41bb6724f (diff)
downloadratpoison-d3cb4e8408cde0e426a7c8a4c52a98af4884bbbf.zip
* src/manage.c (get_wmname): add a debug line to print the
property returned. (get_wmname): add newline in debug print out. (get_wmname): fail if n is 0.
-rw-r--r--ChangeLog1
-rw-r--r--src/manage.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6dc0bde..4b13105 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* src/manage.c (get_wmname): add a debug line to print the
property returned.
(get_wmname): add newline in debug print out.
+ (get_wmname): fail if n is 0.
* src/window.c (window_name): use WIN_NAME_* defines for possible
defaults.win_name values.
diff --git a/src/manage.c b/src/manage.c
index a0bee7f..26a14ee 100644
--- a/src/manage.c
+++ b/src/manage.c
@@ -110,6 +110,13 @@ get_wmname (Window w)
return NULL;
}
+ if (n == 0)
+ {
+ PRINT_DEBUG (("I can't get the WMName.\n"));
+ XFree (name);
+ return NULL;
+ }
+
PRINT_DEBUG (("WM_NAME: '%s'\n", name));
/* duplicate the string into our own buffer, and free the one given