From 2dddacd0a33451ea62df708f5d8a31b99d4c5350 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 5 Aug 2016 16:25:21 +0200 Subject: Fix disconnect/reconnect bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/coopgammad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/coopgammad.c') diff --git a/src/coopgammad.c b/src/coopgammad.c index 1276189..ddb98ad 100644 --- a/src/coopgammad.c +++ b/src/coopgammad.c @@ -423,7 +423,7 @@ static void destroy(int full) disconnect_all(); close_socket(socketpath); free(argv0_real); - if (outputs != NULL) + if ((outputs != NULL) && connected) restore_gamma(); } state_destroy(); -- cgit v1.2.3-70-g09d2