]> git.sur5r.net Git - i3/i3/commitdiff
Fix: ConfigureNotify can crash i3 with fake-outputs 3272/head
authorOrestis Floros <orestisf1993@gmail.com>
Mon, 30 Apr 2018 00:54:38 +0000 (03:54 +0300)
committerOrestis Floros <orestisf1993@gmail.com>
Mon, 30 Apr 2018 00:54:38 +0000 (03:54 +0300)
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.

src/randr.c

index d7e1accab360fd688de099f1e6a734de66b69826..d4d7402a704ccc1dec3f7efb4e56b86d1c6f8aa9 100644 (file)
@@ -856,8 +856,9 @@ void randr_query_outputs(void) {
     /* If there's no randr output, enable the output covering the root window. */
     if (any_randr_output_active()) {
         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;
+        }
     } else {
         DLOG("No active RandR output found. Enabling root output.\n");
         root_output->active = true;