Merge branch '1906_crash_on_syntax'

* 1906_crash_on_syntax:
  Ticket #1906: edit: crash on file open whoen some Syntax files are absent (reported by pavlinux)
This commit is contained in:
Sergei Trofimovich 2009-12-27 10:24:12 +02:00
commit 4c8dbd8f3b

View File

@ -693,11 +693,10 @@ static FILE *open_include_file (const char *filename)
g_free (error_file_name);
error_file_name = g_strconcat (mc_home, PATH_SEP_STR, "syntax", PATH_SEP_STR,
filename, (char *) NULL);
if ((f = fopen (error_file_name, "r"))) {
g_free (error_file_name);
f = fopen (error_file_name, "r");
if (f)
return f;
}
g_free (error_file_name);
error_file_name = g_strconcat (mc_home_alt, PATH_SEP_STR "syntax" PATH_SEP_STR,
filename, (char *) NULL);