Re: a patch for tasklist segfaulting...



On Sun, Mar 11, 2001 at 04:36:22PM +0100, Martin Baulig wrote:
> However, I think it'd be better if Jaca used g_return_val_if_fail() or at
> least put in a g_warning() instead of just making it return. Even if you can
> insert a breakpoint on the return statement, I think it'd be better to have
> it spill out a warning.

Well, actually it IS possible in real life to happen that it's NULL as far as
I'm reading the code.  So a simple return is in fact the correct fix.
Perhaps a warning would have been better since he wasn't sure, but I think
posting to g-h or mailing someone about that is just as good.  It's the
responsibility of the maintainer to figure this one out then.

I think g_return_val_if_fail is bad to use in the case where you are not sure
it MAY happen.  A g_warning would be the correct way, since that can never get
compiled out.

George

-- 
George <jirka 5z com>
   The optimist proclaims that we live in the best of all possible worlds,
   and the pessimist fears this is true.
                       -- James Branch Cabell




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