summaryrefslogtreecommitdiff
path: root/mcwm.c
diff options
context:
space:
mode:
authorMichael Cardell Widerkrantz <mc@hack.org>2011-08-15 21:40:28 +0200
committerMichael Cardell Widerkrantz <mc@hack.org>2011-08-15 21:40:28 +0200
commit2652b36d964ea8ec1dad99ada585fc3a90ecdf17 (patch)
tree7bd80ace9d89d3b21b1ae8e72b8427e520b266d6 /mcwm.c
parent932d2bb770df050e2c67cb2014f6c40f50df45b8 (diff)
downloadmcwm-2652b36d964ea8ec1dad99ada585fc3a90ecdf17.zip
Don't try to follow an empty monlist (use of NULL pointer!).
Diffstat (limited to 'mcwm.c')
-rw-r--r--mcwm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mcwm.c b/mcwm.c
index a42a522..f8eea87 100644
--- a/mcwm.c
+++ b/mcwm.c
@@ -1013,7 +1013,7 @@ void newwin(xcb_window_t win)
* Window coordinates are outside all physical monitors.
* Choose the first screen.
*/
- if (NULL != monlist->data)
+ if (NULL != monlist)
{
client->monitor = monlist->data;
}
@@ -1614,7 +1614,7 @@ void getoutputs(xcb_randr_output_t *outputs, int len, xcb_timestamp_t timestamp)
{
if (NULL == client->monitor->item->next)
{
- if (NULL == monlist->data)
+ if (NULL == monlist)
{
client->monitor = NULL;
}