[template-glib] gi: check base info for NULL



commit c47cbd3b795cc81d9c9adfca4d5e3a8a7860d988
Author: Christian Hergert <chergert redhat com>
Date:   Mon Oct 23 21:00:10 2017 -0700

    gi: check base info for NULL

 src/tmpl-expr-eval.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/tmpl-expr-eval.c b/src/tmpl-expr-eval.c
index b78377a..7d81a7b 100644
--- a/src/tmpl-expr-eval.c
+++ b/src/tmpl-expr-eval.c
@@ -799,7 +799,7 @@ tmpl_expr_gi_call_eval (TmplExprGiCall  *node,
 
       base_info = g_irepository_find_by_name (repository, ns, node->name);
 
-      if (!GI_IS_FUNCTION_INFO (base_info))
+      if (base_info == NULL || !GI_IS_FUNCTION_INFO (base_info))
         {
           g_set_error (error,
                        TMPL_ERROR,


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