Re: the change of addresses



On Mon, 19 Aug 2002 11:07:53 +0200 (MEST) "Simon Fuhrmann"
<SimLetters gmx de> wrote:

And now the problem: The adress I got the first time from
"sim_win_simfm_new" and the address I pass to the
"sim_win_simfm_signal_connect" function is(of corse) the same. But when
the signal gets emitted, the address that gets passed to
"sim_win_simfm_destroy" is DIFFRENT. So a segfault accures because the
destroy-func tries to destroy the struct which is not there (on this
address in memory). Why? What have did I do wrong? Why the address
changes when the singnal gets emitted?

the callback prototype is not correct, change that to:

static void sim_win_simfm_destroy(GtkWidget * widget, GdkEvent
*event,(struct sim_win_simfm_t *) win_simfm);

you can find the correct prototype for every signal in the reference
guide.

regards,
        Olivier

Attachment: pgpTjJMNBN3Ds.pgp
Description: PGP signature



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