Fix a segfault caused by .desktop file with no exec= line.
authorVedran Rodic <vrodic@gmail.com>
Sun, 28 Oct 2012 11:07:41 +0000 (12:07 +0100)
committerLaurent Monin <zas@norz.org>
Sun, 28 Oct 2012 11:08:59 +0000 (12:08 +0100)
https://bugs.launchpad.net/ubuntu/+source/geeqie/+bug/1056532

src/editors.c

index 5931c05..1bf2553 100644 (file)
@@ -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;