summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hofmann <scm@uninformativ.de>2014-06-21 09:18:14 +0200
committerPeter Hofmann <scm@uninformativ.de>2014-06-21 09:18:14 +0200
commita6b19f00b57dcf987b423b5ec0f5c26bdb0e6115 (patch)
treeaa5debeba7b1fe566a5072e7026277b21e546608
parent592387b48c3b75fa130030ee1fc0fd3da841ba3d (diff)
downloadlariza-a6b19f00b57dcf987b423b5ec0f5c26bdb0e6115.tar.gz
Fix some NULL pointers
GLib catched these errors but it's wrong nevertheless.
-rw-r--r--browser.c9
1 files 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)
{