Re: Question: gda-clnt/gda-recordset.c



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]