libfm/libfm-0.1.11-gterm-argc.patch

21 lines
719 B
Diff

--- libfm-0.1.11/src/gnome-terminal-wrapper.c.debug 2010-04-25 01:00:24.000000000 +0900
+++ libfm-0.1.11/src/gnome-terminal-wrapper.c 2010-05-07 16:58:20.000000000 +0900
@@ -82,7 +82,7 @@
path = sep + 1;
g_setenv("PATH", path, TRUE);
- if(argc < 2) /* only execute the temrinal emulator */
+ if((argc < 2) && terminal) /* only execute the temrinal emulator */
{
sep = strchr(terminal, ' ');
if(sep)
@@ -90,7 +90,7 @@
argv[0] = terminal;
}
- if( strcmp(argv[1], "-x") == 0 ) /* gnome-terminal -x */
+ if( (argc >= 2) && (strcmp(argv[1], "-x") == 0) ) /* gnome-terminal -x */
{
/* this is mostly called from glib/gio */
int term_argc;