[nautilus-actions] Only try to split non-null command
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Only try to split non-null command
- Date: Tue, 17 Aug 2010 20:55:20 +0000 (UTC)
commit ba0c9b7ba74f66fb58ab868a176272e8da96fd75
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Aug 17 13:23:33 2010 +0200
Only try to split non-null command
Fix segfault when Exec is empty.
ChangeLog | 5 +++++
src/io-desktop/nadp-reader.c | 13 ++++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1341f22..c7e161a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-17 Pierre Wieser <pwieser trychlos org>
+
+ * src/io-desktop/nadp-reader.c (read_done_profile_split_exec):
+ Only try to split a non-null command.
+
2010-08-16 Pierre Wieser <pwieser trychlos org>
* doc/nact/Makefile.am: Fix PDF build.
diff --git a/src/io-desktop/nadp-reader.c b/src/io-desktop/nadp-reader.c
index ddfa075..c714e02 100644
--- a/src/io-desktop/nadp-reader.c
+++ b/src/io-desktop/nadp-reader.c
@@ -682,11 +682,14 @@ read_done_profile_split_exec( const NAIFactoryProvider *provider, NAObjectProfil
gchar *path, *parameters;
exec = na_object_get_path( profile );
- na_core_utils_str_split_first_word( exec, &path, ¶meters );
- na_object_set_path( profile, path );
- na_object_set_parameters( profile, parameters );
- g_free( parameters );
- g_free( path );
+ if( exec && g_utf8_strlen( exec, -1 )){
+ na_core_utils_str_split_first_word( exec, &path, ¶meters );
+ na_object_set_path( profile, path );
+ na_object_set_parameters( profile, parameters );
+ g_free( parameters );
+ g_free( path );
+ }
+
g_free( exec );
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]