clang: Fix crash if error is not related to a file

This commit is contained in:
Andy Williams 2015-04-12 23:39:38 +01:00
parent 17d8b30e00
commit 179b0e713f
1 changed files with 1 additions and 1 deletions

View File

@ -458,7 +458,7 @@ _clang_load_errors(const char *path EINA_UNUSED, Edi_Editor *editor)
clang_getSpellingLocation(clang_getDiagnosticLocation(diag), &file, &line, NULL, NULL);
path = clang_getFileName(file);
if (strcmp(elm_code_file_path_get(code->file), clang_getCString(path)))
if (!clang_getCString(path) || strcmp(elm_code_file_path_get(code->file), clang_getCString(path)))
continue;
/* FIXME: Also handle ranges and fix suggestions. */