diff --git a/objects/screen.c b/objects/screen.c index c7e508b7..bad789fa 100644 --- a/objects/screen.c +++ b/objects/screen.c @@ -363,7 +363,7 @@ screen_getbycoord(int x, int y) return *s; /* No screen found, find nearest screen. */ - screen_t *nearest_screen = globalconf.screens.tab[0]; + screen_t *nearest_screen = NULL; unsigned int nearest_dist = UINT_MAX; foreach(s, globalconf.screens) {