anjuta r4435 - in trunk: . plugins/class-gen
- From: sgranjoux svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4435 - in trunk: . plugins/class-gen
- Date: Wed, 10 Dec 2008 18:43:01 +0000 (UTC)
Author: sgranjoux
Date: Wed Dec 10 18:43:01 2008
New Revision: 4435
URL: http://svn.gnome.org/viewvc/anjuta?rev=4435&view=rev
Log:
* plugins/class-gen/window.c,
plugins/class-gen/element-editor.c:
Fix #563685 crash when trying to create a GObject
Modified:
trunk/ChangeLog
trunk/plugins/class-gen/element-editor.c
trunk/plugins/class-gen/window.c
Modified: trunk/plugins/class-gen/element-editor.c
==============================================================================
--- trunk/plugins/class-gen/element-editor.c (original)
+++ trunk/plugins/class-gen/element-editor.c Wed Dec 10 18:43:01 2008
@@ -735,17 +735,21 @@
gpointer data,
gpointer user_data)
{
- GString *str;
- gchar *escaped;
-
- str = (GString*)user_data;
- escaped = g_strescape ((const gchar *) data, NULL);
+
+ if (data)
+ {
+ GString *str;
+ gchar *escaped;
+
+ str = (GString*)user_data;
+ escaped = g_strescape ((const gchar *) data, NULL);
- g_string_append (str, (const gchar *) key);
- g_string_append (str, "=\"");
- g_string_append (str, escaped);
- g_string_append (str, "\";");
- g_free (escaped);
+ g_string_append (str, (const gchar *) key);
+ g_string_append (str, "=\"");
+ g_string_append (str, escaped);
+ g_string_append (str, "\";");
+ g_free (escaped);
+ }
}
static void
Modified: trunk/plugins/class-gen/window.c
==============================================================================
--- trunk/plugins/class-gen/window.c (original)
+++ trunk/plugins/class-gen/window.c Wed Dec 10 18:43:01 2008
@@ -615,7 +615,7 @@
cg_transform_flags (table, "Flags", GO_PROPERTY_FLAGS);
paramspec = g_hash_table_lookup (table, "ParamSpec");
- if (strcmp (paramspec, "g_param_spec_string") == 0)
+ if (paramspec && (strcmp (paramspec, "g_param_spec_string") == 0))
cg_transform_string (table, "Default");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]