ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=179b0e713f5992ee53940a5175fab07f3d78b559

commit 179b0e713f5992ee53940a5175fab07f3d78b559
Author: Andy Williams <a...@andywilliams.me>
Date:   Sun Apr 12 23:39:38 2015 +0100

    clang: Fix crash if error is not related to a file
---
 src/bin/editor/edi_editor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index 5993462..092dc62 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -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. */

-- 


Reply via email to