----- Original Message -----
From: "Varlock" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 03, 2002 1:55 PM
Subject: Re: [hlcoders] Items.cpp (MyTouch)


>     I do not claim to understand how compilers work and whether something
> SHOULD work or whether it shouldn't or why, but I have a suggestion for
you.
>     I've had a problem similar to this before, and it seems that you must
> seperate any 'if' statements where you are checking to see if a pointer is
> valid from ANY use of that pointer. So you should *try* this:
>
> if( pPlayer )
> {
>     if( pPlayer->IsAlive( ) )
>     {
>
> etc...
>
>     This is just an idea. If it works, good. If not, well, whatever.
>
> - Varlock

True, but unfortunately/fortunately in this case, the body of the while loop
won't be entered if pPlayer is NULL, so the "if (pPlayer)" part will ALWAYS
be true (and in fact that code is unnecessary).

Jeffrey "botman" Broome

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to