[gjs] arg.c: Fix crash in error path



commit 984d3cc3ebc6bab546a0729b1465a7209b26abb1
Author: Colin Walters <walters verbum org>
Date:   Thu May 19 17:09:43 2011 -0400

    arg.c: Fix crash in error path
    
    We can't use g_base_info_get_name on a GITypeInfo.

 gi/arg.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gi/arg.c b/gi/arg.c
index ebebbf7..aa1bba8 100644
--- a/gi/arg.c
+++ b/gi/arg.c
@@ -510,9 +510,9 @@ gjs_string_to_intarray(JSContext   *context,
         return JS_TRUE;
 
     default:
-        // can't convert a string to this type.
-        gjs_throw(context, "Cannot convert string to type '%s'",
-                  g_base_info_get_name((GIBaseInfo*) param_info));
+        /* can't convert a string to this type */
+        gjs_throw(context, "Cannot convert string to array of '%s'",
+                  g_type_tag_to_string (element_type));
         return JS_FALSE;
     }
 }



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