segfault when destroying GtkTextChildAnchors
- From: muppet <scott asofyet org>
- To: gtk-devel-list gnome org
- Subject: segfault when destroying GtkTextChildAnchors
- Date: Fri, 23 Jan 2004 00:24:15 -0500
as seen in bugzilla: http://bugzilla.gnome.org/show_bug.cgi?id=132260
this kind of code results in a segfault:
anchor = gtk_text_child_anchor_new ();
g_object_unref (anchor);
basically, you decide not to use a new anchor and destroy it before
putting it into a textbuffer. anchor->segment doesn't get set, and
gtk_text_child_anchor_finalize() barfs all over itself when it tries to
dereference NULL.
i created a patch that just checks for NULL before doing anything with
segment, and it seems to work fine.
however, it seems so obvious, and has never been a problem before, that
i wonder if i'm doing something that i really shouldn't have been
doing. is it invalid to create a child anchor without a text buffer?
--
Brian: If i recall correctly, this is the physics department.
Chris: That explains all that gravity.
-- Family Guy, "The Story on Page One"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]