Fix crash in screen_getbycoord without any screens
Ref: https://github.com/awesomeWM/awesome/issues/793#issuecomment-205245346
This commit is contained in:
parent
e24cb901cb
commit
b643279e4a
|
@ -363,7 +363,7 @@ screen_getbycoord(int x, int y)
|
||||||
return *s;
|
return *s;
|
||||||
|
|
||||||
/* No screen found, find nearest screen. */
|
/* 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;
|
unsigned int nearest_dist = UINT_MAX;
|
||||||
foreach(s, globalconf.screens)
|
foreach(s, globalconf.screens)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue