From a6b19f00b57dcf987b423b5ec0f5c26bdb0e6115 Mon Sep 17 00:00:00 2001 From: Peter Hofmann Date: Sat, 21 Jun 2014 09:18:14 +0200 Subject: Fix some NULL pointers GLib catched these errors but it's wrong nevertheless. --- browser.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/browser.c b/browser.c index 835951b..3f2ee39 100644 --- a/browser.c +++ b/browser.c @@ -143,8 +143,8 @@ adblock_load(void) } g_free(buf); } + g_io_channel_shutdown(channel, FALSE, NULL); } - g_io_channel_shutdown(channel, FALSE, NULL); g_free(path); } @@ -821,8 +821,8 @@ keywords_load(void) } g_free(buf); } + g_io_channel_shutdown(channel, FALSE, NULL); } - g_io_channel_shutdown(channel, FALSE, NULL); g_free(path); } @@ -899,6 +899,11 @@ tabbed_launch(void) } tabbed_stdout_channel = g_io_channel_unix_new(tabbed_stdout); + if (tabbed_stdout_channel == NULL) + { + fprintf(stderr, __NAME__": Could open tabbed's stdout\n"); + return 0; + } g_io_channel_read_line(tabbed_stdout_channel, &output, NULL, NULL, NULL); if (output == NULL) { -- cgit v1.2.3