Re: Question: gda-clnt/gda-recordset.c
- From: Rodrigo Moya <rmoya tsai es>
- To: gnome-db-list gnome org
- Subject: Re: Question: gda-clnt/gda-recordset.c
- Date: Sun, 28 Nov 1999 21:43:21 +0100
Stephan Heinze wrote:
> Hi all,
>
> am I wrong or should there be a check for NULL pointer in
> gda-clnt/gda-recordset.c like
>
> void
> gda_recordset_close(Gda_Recordset* rs)
> {
> if (NULL==rs)
> {
> g_error("invalid Gda_Recordset* in gda_recordset_close\n");
> return;
> }
>
> [snip code]
> }
>
> in every function like this one before accessing the stuctures member?
>
> IMHO the check rs->open would dump a core if rs is NULL.
>
>
Yes, you're right. But the check should be:
g_return_[val_]if_fail(IS_GDA_RECORDSET(rs));
Since the GDA structures are all GTK objects. I'm adding all this to CVS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]