dlls/wined3d/device.c GetCreationParameters

Aric Cyr Aric.Cyr at gmail.com
Tue Jan 17 05:20:55 CST 2006

Andreas Mohr <andi <at> rhlx01.fht-esslingen.de> writes:
> On Tue, Jan 17, 2006 at 11:16:42AM +0100, Alexandre Julliard wrote:
> > Aric Cyr <Aric.Cyr <at> gmail.com> writes:
> > 
> > > Ya, I thought about that after I sent my previous mail as well...  an 
> > > assert would probably be more useful for checking "This".
> >
> > Not checking at all and crashing works just as well to catch problems,
> > and doesn't hurt performance. There's no reason to add NULL checks
> > unless there is a Windows app that depends on it.
> "Stupid" NULL pointer checks even actively hurt debugging since in severe
> cases you may have a function "properly" (*cough*) failing due to a NULL
> pointer check, but then "unfortunately" you notice the effect of this
> "properly checked" anomaly "only" 3 layers and 5000 relay log lines later
> when something almost entirely unrelated really breaks with a SEGV.
> Have fun wasting the time to trace back those 3 layers to the real offender...

I'd have to (and did) agree that the NULL check for "This" wasn't a great idea,
and thus suggested an assert.  However, as wine does have a built in debugger,
even that would really be unnecessary (as Alexandre pointed out), and crashing
on the access would be just as good.  I personally like asserts for getting
debug info without needing to fire up a debugger since it is not always easy to
reproduce a problem, especially when you aren't expecting any (and please no one
suggest that I always launch all my apps with gdb... ;)


More information about the wine-devel mailing list