Re: Segmentation fault in code - possible bug?



Hi Joe,

Joseph Turner wrote:
When I run the resulting program and press the button at the top of the window
it gets rid of the gtk_entry. If I keep pressing this button, I get a
segmentation fault.

If I replace the entry widget with a button say, (and other code as well)
I can keep pressing the top button without any segmentation fault.

You shouldn't destroy a widget more than once: it's like free()ing something twice. If it didn't fault with the button there instead of the entry, it's only because you were very lucky :-)

John



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