Hello.

Continuing my tests to have a list store with NULL values, I found that
if I try to gtk_tree_model_get_value(m, &i, INT_COL, &gv) on a cell I
didn't gtk_tree_model_set, I get a segfault :

(diacat:3974): GLib-GObject-WARNING **: gvalue.c:83:g_value_init():
cannot initialize GValue with type `gint', the value has already been
initialized as `(null)'

Program received signal SIGSEGV, Segmentation fault.
0x406deb3a in g_type_check_value_holds (value=0xbfffdf94, type=24) at
gtype.c:2873
2873          if (node->data && node->data->common.ref_count > 0 &&
(gdb) bt
#0  0x406deb3a in g_type_check_value_holds (value=0xbfffdf94, type=24)
at gtype.c:2873
#1  0x406e3f0e in g_value_set_int (value=0xbfffdf94, v_int=0) at
gvaluetypes.c:605
#2  0x404f0a90 in _gtk_tree_data_list_node_to_value (list=0x81aa708,
type=24, value=0xbfffdf94)
    at gtktreedatalist.c:131
#3  0x40457a5d in gtk_list_store_get_value (tree_model=0x81494f8,
iter=0xbfffe3b4, column=7, 
    value=0xbfffdf94) at gtkliststore.c:576
#4  0x404f368e in gtk_tree_model_get_value (tree_model=0x81494f8,
iter=0xbfffe3b4, column=7, 
    value=0xbfffdf94) at gtktreemodel.c:884

IMO it shouldn't segfault... Just return a GValue that's G_TYPE_INVALID
or similar.

Any hint about what should I do to recognize if a cell is unset (maybe
w/o a segfault, please :-) )?

Tks.

BYtE,
 Diego.
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to