Fix: ConfigureNotify can crash i3 with fake-outputs

handle_screen_change() and handle_configure_notify() call
randr_query_outputs() where root_output is not initialized because
randr_init() is never called when config.fake_outputs is not NULL.
This commit is contained in:
Orestis Floros 2018-04-30 03:54:38 +03:00
parent 6f11b6fa4a
commit 1f74f8d2c1
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
1 changed files with 2 additions and 1 deletions

View File

@ -856,8 +856,9 @@ void randr_query_outputs(void) {
/* If there's no randr output, enable the output covering the root window. */ /* If there's no randr output, enable the output covering the root window. */
if (any_randr_output_active()) { if (any_randr_output_active()) {
DLOG("Active RandR output found. Disabling root output.\n"); DLOG("Active RandR output found. Disabling root output.\n");
if (root_output->active) if (root_output && root_output->active) {
root_output->to_be_disabled = true; root_output->to_be_disabled = true;
}
} else { } else {
DLOG("No active RandR output found. Enabling root output.\n"); DLOG("No active RandR output found. Enabling root output.\n");
root_output->active = true; root_output->active = true;