From 70dd6e2cefa0438c9ce4fbb884eb0b8fdffdf1b5 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 5 Jan 2016 21:46:05 +0100 Subject: [PATCH] Replace code we should never hit by an assert, as it should be. --- source/rofi.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/source/rofi.c b/source/rofi.c index a95ddbb6..cd843ea4 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -2001,14 +2001,7 @@ static void cleanup () } // Cleanup if ( display != NULL ) { - if ( main_window != None ) { - // We should never hit this code. - release_keyboard ( display ); - XDestroyWindow ( display, main_window ); - main_window = None; - XDestroyIC ( xic ); - XCloseIM ( xim ); - } + g_assert ( main_window == None ); if ( sncontext != NULL ) { sn_launchee_context_unref ( sncontext );