[SDL] SDL 1.3 SDL_WarpMouseInWindow(...) Not Working (svn revision 4488)

Scott Nykl nykl1206 at hotmail.com
Wed Apr 22 21:55:23 PDT 2009


>----- Original Message ----

>From: Donny Viszneki <donny.viszneki at gmail.com>
>Subject: Re: [SDL] "Text has zero width" isn't an error.
>
>Am I being stubborn if I say rotozoomSurface *should* crash if passed
>a NULL pointer or a no-pixel surface? I frequently argue in favor of
>more checking when they aren't very expensive, but secretly I wonder
>if we're all such bad hackers that we can't accept a segfault to show
>us exactly where the *one* check *should* have been...

IMO, a well-designed program or library should *never* segfault.  If an
external library routine receives incorrect input, the routine should fail
with some sort of helpful error message.  If an internal routine receives
bad input, it ought to no-op if it can, or raise an assertion failure if.
that wouldn't work.  (Not sure if C has those, though...)




More information about the SDL mailing list