Summary Files Commits Branches @commit @diff @stats
path: root / badwolf.c
diff options
context:
space:
mode:
1 files changed, 3 insertions, 2 deletions
-rw-r--r--badwolf.c5
diff --git a/badwolf.c b/badwolf.c
index bf42eb2..909df75 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -11,7 +11,8 @@
#include <glib/gprintf.h> /* g_fprintf() */
#include <libsoup/soup.h> /* soup* */
#include <locale.h> /* LC_* */
-#include <stdlib.h> /* realpath(), malloc() */
+#include <stdlib.h> /* malloc() */
+#include <unistd.h> /* access() */
const gchar *homepage = "https://hacktivis.me/projects/badwolf";
const gchar *version = VERSION;
@@ -67,7 +68,7 @@ badwolf_ensure_uri_scheme(const gchar *text, gboolean try_file)
{
SoupURI *uri = soup_uri_new(text);
- if(uri->path == NULL)
+ if(uri->path == NULL || text == NULL)
{
soup_uri_free(uri);
return "about:blank";