From a8a8ba8cd2eb8a6070b8d5356e26b1e81add2392 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Wed, 27 Jan 2016 23:49:56 +0100 Subject: [PATCH] Only remove source if exists --- source/rofi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/rofi.c b/source/rofi.c index 9981a6c6..83632a83 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -2012,7 +2012,9 @@ static void cleanup () tpool = NULL; } if ( main_loop != NULL ) { - g_source_destroy ( main_loop_source ); + if( main_loop_source) { + g_source_destroy ( main_loop_source ); + } g_main_loop_unref ( main_loop ); main_loop = NULL; }