From: Michael Stapelberg Date: Sat, 15 Oct 2011 15:56:32 +0000 (+0100) Subject: Don’t call ev_destroy_loop with ev < 4 in atexit (Thanks xeen) X-Git-Tag: 4.1~100 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=32b97745ecac6b98a1da8b65a13e46cb9c2ef9e8;p=i3%2Fi3 Don’t call ev_destroy_loop with ev < 4 in atexit (Thanks xeen) --- diff --git a/src/main.c b/src/main.c index 610a2c19..ffdc1fd3 100644 --- a/src/main.c +++ b/src/main.c @@ -181,7 +181,12 @@ static void xkb_got_event(EV_P_ struct ev_io *w, int revents) { * */ static void i3_exit() { +/* We need ev >= 4 for the following code. Since it is not *that* important (it + * only makes sure that there are no i3-nagbar instances left behind) we still + * support old systems with libev 3. */ +#if EV_VERSION_MAJOR >= 4 ev_loop_destroy(main_loop); +#endif } int main(int argc, char *argv[]) {