]> saetta.ns0.it Git - libgtkform/commitdiff
Bug on just added functions (not initialized private struct).
authorAndrea Zagli <azagli@libero.it>
Mon, 27 Jul 2009 16:28:48 +0000 (18:28 +0200)
committerAndrea Zagli <azagli@libero.it>
Mon, 27 Jul 2009 16:28:48 +0000 (18:28 +0200)
src/form.c

index 007b242afb0956a77bec23222eb92a8afd549bc9..ae7bcb67c5952b6ce3e56b3c56b01bb1b231fa61 100644 (file)
@@ -85,7 +85,7 @@ gtk_form_init (GtkForm *form)
 {
        GtkFormPrivate *priv = GTK_FORM_GET_PRIVATE (form);
 
-       priv->table = "";
+       priv->table = g_strdup ("");
        priv->fields = NULL;
        priv->key = NULL;
 }
@@ -171,6 +171,8 @@ const gchar
 
        g_return_val_if_fail (IS_GTK_FORM (form), NULL);
 
+       priv = GTK_FORM_GET_PRIVATE (form);
+
        return (const gchar *)g_strdup (priv->table);
 }
 
@@ -188,6 +190,8 @@ gtk_form_set_table (GtkForm *form, const gchar *table)
        g_return_if_fail (IS_GTK_FORM (form));
        g_return_if_fail (table != NULL);
 
+       priv = GTK_FORM_GET_PRIVATE (form);
+
        priv->table = g_strstrip (g_strdup (table));
 }
 
@@ -204,6 +208,8 @@ gtk_form_get_key (GtkForm *form)
 
        g_return_val_if_fail (IS_GTK_FORM (form), NULL);
 
+       priv = GTK_FORM_GET_PRIVATE (form);
+
        return priv->key;
 }
 
@@ -221,6 +227,8 @@ gtk_form_set_key (GtkForm *form, GtkFormKey *key)
        g_return_if_fail (IS_GTK_FORM (form));
        g_return_if_fail (IS_GTK_FORM_KEY (key));
 
+       priv = GTK_FORM_GET_PRIVATE (form);
+
        priv->key = key;
 }