Re: emitting the "delete_event" in a "key_press_event" --> crash
- From: Olivier Sessink <olivier lx student wau nl>
- To: Olexiy Avramchenko <ath beast stu cn ua>
- Cc: otaylor redhat com, gtk-app-devel-list gnome org
- Subject: Re: emitting the "delete_event" in a "key_press_event" --> crash
- Date: Thu, 07 Nov 2002 14:44:59 +0100
On Thu, 07 Nov 2002 15:32:37 +0200 "Olexiy Avramchenko"
<ath beast stu cn ua> wrote:
I looked more at your source... Sorry its completely broken... "destroy"
signal and
"destroy_event" are not the same. "destroy" signal (GtkObject) doesnt
have a parameters
but "destroy_event" (GtkWidget) has. By the way, you are connecting the
same function (where
you're doing gfree) to two different signals.
thanks a lot :))
fixed the problem:
-calling gtk_widget_destroy() from the keypress callback now
-connecting ONLY to "destroy_event" to free the struct
no segfaults anymore :)))
g_signal_handlers_destroy(G_OBJECT(testwin->win));
gtk_widget_destroy(testwin->win); g_free(testwin);
Here's one more bug - you may call gfree two times.
why is this a bug then? what is the problem with this code?
thanks for your great support!
Olivier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]