From: Vedran Rodic Date: Sun, 28 Oct 2012 11:07:41 +0000 (+0100) Subject: Fix a segfault caused by .desktop file with no exec= line. X-Git-Tag: v1.2~8 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=cf90f247aceadb444297c3c66e2215e8c209ca69 Fix a segfault caused by .desktop file with no exec= line. https://bugs.launchpad.net/ubuntu/+source/geeqie/+bug/1056532 --- diff --git a/src/editors.c b/src/editors.c index 5931c056..1bf2553f 100644 --- a/src/editors.c +++ b/src/editors.c @@ -759,7 +759,7 @@ EditorFlags editor_command_parse(const EditorDescription *editor, GList *list, g if (output) result = g_string_new(""); - if (editor->exec[0] == '\0') + if (editor->exec == NULL || editor->exec[0] == '\0') { flags |= EDITOR_ERROR_EMPTY; goto err;