Summary Files Commits Branches @commit @diff @stats
path: root / badwolf.c
diff options
context:
space:
mode:
Commit94bc1e381baacba8a45f5782f368af11eff279a7 (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2019-12-15 19:33:19 +0100
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2019-12-15 19:33:29 +0100
Files97b1196dd6f56724174479bb6dc87a570299c923 /badwolf.c
goodwolf-94bc1e381baacba8a45f5782f368af11eff279a7.tar
goodwolf-94bc1e381baacba8a45f5782f368af11eff279a7.tar.gz
goodwolf-94bc1e381baacba8a45f5782f368af11eff279a7.zip
Parent446003a4e1b7f8e0673e361f1691d72d8a378173 (diff)
badwolf.c: Fix access() usage
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";