Re: segfault when destroying GtkTextChildAnchors



> 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?
> 

See http://bugzilla.gnome.org/show_bug.cgi?id=70601 which seems to
complain about more or less the same thing.

Matthias

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Bis 31.1.: TopMail + Digicam für nur 29 EUR http://www.gmx.net/topmail




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