]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Fix launcher crashing once X session exits
authorPhillip Berndt <phillip.berndt@googlemail.com>
Mon, 4 May 2020 06:56:48 +0000 (08:56 +0200)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Mon, 4 May 2020 06:57:53 +0000 (08:57 +0200)
This is part of the fix for #199.

contrib/autorandr_launcher/autorandr_launcher.c

index 923ab98451f8bb01cefb3c3a8de76f535e1b11db..962a71b962e8cd549be4a5b12fd2c5fa04cc9b8a 100644 (file)
@@ -140,6 +140,10 @@ int main(int argc, char **argv)
 
                ar_log("Waiting for event\n");
                xcb_generic_event_t *evt = xcb_wait_for_event(c);
+               if (!evt) {
+                       break;
+               }
+
                // ar_log("Event type: %" PRIu8 "\n", evt->response_type);
                // ar_log("screen change masked: %" PRIu8 "\n",
                //       evt->response_type &