Re: segfault



On Fri, 2005-07-22 at 21:54 +0200, Jens Luedicke wrote:

clicking 'Remove' (below the listed mimetypes) segfaults the program.

If I had to guess, I'd say it's because you store the iter in the
selection's "changed" handler without copying it:

  $self->{selected_type_iter} = $selection->get_selected;

Iters are very short-lived kinds of beasts.  Storing them somewhere is
almost always a bad idea.  Either try $selection->get_selected->copy or
simply re-fetch the iter in the button's "clicked" handler.

-- 
Bye,
-Torsten




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