diff options
-rw-r--r-- | gtk/gtk_gui.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c index b7cae501e..79391ab4f 100644 --- a/gtk/gtk_gui.c +++ b/gtk/gtk_gui.c @@ -751,6 +751,10 @@ char *path_to_url(const char *path) int urllen = strlen(path) + FILE_SCHEME_PREFIX_LEN + 1; char *url = malloc(urllen); + if (url == NULL) { + return NULL; + } + if (*path == '/') { path++; /* file: paths are already absolute */ } |