[gtranslator] Don't try to load code file if the path is NULL



commit 5f531ce20bfc394007ad0fae37eeab5435d8933e
Author: Daniel GarcĂ­a Moreno <dani danigm net>
Date:   Mon Apr 4 20:59:23 2022 +0200

    Don't try to load code file if the path is NULL
    
    Fix https://gitlab.gnome.org/GNOME/gtranslator/-/issues/155

 src/codeview/gtr-codeview.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/codeview/gtr-codeview.c b/src/codeview/gtr-codeview.c
index 9590f2ca..a639a3e8 100644
--- a/src/codeview/gtr-codeview.c
+++ b/src/codeview/gtr-codeview.c
@@ -208,6 +208,9 @@ follow_if_link (GtrCodeView *codeview, GtkWidget *text_view, GtkTextIter *iter)
       int line = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "line"));
       g_autofree char *fullpath = NULL;
 
+      if (!path)
+        continue;
+
       fullpath = find_source_file (codeview, path);
 
       if (fullpath && path_is_fake (fullpath))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]