mirror of https://github.com/davatorium/rofi.git
is active can be NULL, check
This commit is contained in:
parent
51a4c252f4
commit
93b80be913
|
@ -112,6 +112,9 @@ int monitor_get_smallest_size ( void )
|
|||
fprintf ( stderr, "Couldn't query Xinerama\n" );
|
||||
return size;
|
||||
}
|
||||
if ( is_active == NULL ) {
|
||||
return size;
|
||||
}
|
||||
if ( !is_active->state ) {
|
||||
free ( is_active );
|
||||
return size;
|
||||
|
@ -150,6 +153,9 @@ int monitor_get_dimension ( int monitor, workarea *mon )
|
|||
fprintf ( stderr, "Error getting screen info\n" );
|
||||
return FALSE;
|
||||
}
|
||||
if ( is_active == NULL ) {
|
||||
return FALSE;
|
||||
}
|
||||
if ( !is_active->state ) {
|
||||
free ( is_active );
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in New Issue