summaryrefslogtreecommitdiff
path: root/mcwm.c
diff options
context:
space:
mode:
authorMichael Cardell Widerkrantz <mc@hack.org>2010-07-21 10:47:33 +0200
committerMichael Cardell Widerkrantz <mc@hack.org>2010-07-21 10:47:33 +0200
commit6a884fa51dbe8618af467900d940f3addea57ceb (patch)
tree5d80226dc9e5447f555fd3c74f52edd8c54b32cc /mcwm.c
parent52e45ec3cd0c387c570c34cfd989637f595a82b3 (diff)
downloadmcwm-6a884fa51dbe8618af467900d940f3addea57ceb.zip
More explicit checks for client == NULL. Added debug output as well.
Diffstat (limited to 'mcwm.c')
-rw-r--r--mcwm.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/mcwm.c b/mcwm.c
index e9c5927..d6d2371 100644
--- a/mcwm.c
+++ b/mcwm.c
@@ -628,7 +628,12 @@ uint32_t getcolor(const char *colstr)
void forgetclient(struct client *client)
{
-
+ if (NULL == client)
+ {
+ PDEBUG("forgetclient: client was NULL\n");
+ return;
+ }
+
/* Delete window from workspace list. */
delfromworkspace(client, curws);
@@ -1675,6 +1680,12 @@ void unmax(struct client *client)
{
uint32_t values[5];
uint32_t mask = 0;
+
+ if (NULL == client)
+ {
+ PDEBUG("unmax: client was NULL!\n");
+ return;
+ }
/* Restore geometry. */
values[0] = client->x;
@@ -1704,6 +1715,7 @@ void maximize(struct client *client)
if (NULL == client)
{
+ PDEBUG("maximize: client was NULL!\n");
return;
}
@@ -1765,6 +1777,7 @@ void maxvert(struct client *client)
if (NULL == client)
{
+ PDEBUG("maxvert: client was NULL\n");
return;
}