diff options
author | Peter Hofmann <scm@uninformativ.de> | 2014-06-21 09:18:14 +0200 |
---|---|---|
committer | Peter Hofmann <scm@uninformativ.de> | 2014-06-21 09:18:14 +0200 |
commit | a6b19f00b57dcf987b423b5ec0f5c26bdb0e6115 (patch) | |
tree | aa5debeba7b1fe566a5072e7026277b21e546608 | |
parent | 592387b48c3b75fa130030ee1fc0fd3da841ba3d (diff) | |
download | lariza-a6b19f00b57dcf987b423b5ec0f5c26bdb0e6115.tar.gz |
Fix some NULL pointers
GLib catched these errors but it's wrong nevertheless.
-rw-r--r-- | browser.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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) { |