Merge pull request #798 from blueyed/fix-crash-in-screen_getbycoord

Fix crash in screen_getbycoord without any screens [ci skip]
This commit is contained in:
Daniel Hahler 2016-04-04 20:34:12 +02:00
commit ae17c66e27

View file

@ -364,7 +364,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)
{