changeset 2225:4617e1d83e9b

Fix a segfault caused by .desktop file with no exec= line. https://bugs.launchpad.net/ubuntu/+source/geeqie/+bug/1056532
author Vedran Rodic <vrodic@gmail.com>
date Sun, 28 Oct 2012 12:07:41 +0100
parents 54912b5d142d
children 7a22d88fcc24 44a42a639ef5 083592055bcd de3ebbdacaa8 b7e253153aa4
files src/editors.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/editors.c	Tue Oct 02 23:07:47 2012 +0100
+++ b/src/editors.c	Sun Oct 28 12:07:41 2012 +0100
@@ -759,7 +759,7 @@
 	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;