Fix crash in screen_getbycoord without any screens

Ref: https://github.com/awesomeWM/awesome/issues/793#issuecomment-205245346
This commit is contained in:
Uli Schlachter 2016-04-04 20:13:27 +02:00 committed by Daniel Hahler
parent e24cb901cb
commit b643279e4a
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{