[sldev] Why won't isAvatar() work?

Nicholaz Beresford nicholaz at blueflash.cc
Thu Oct 4 05:59:08 PDT 2007



Michael Miller wrote:
>     I looked a bit at the code. Do you do it at the end of the function,
>     before the last line?
>  
> Yes, I do it right before the closing brace of the method(after every 
> last bit of SL code has been executed).

Try putting it inside the for loop (second closing curly brace from
bottom).  Otherwise you may miss object updates anyway (the function
can handle more objects and outside the loop you'll only get one (if
any at all).


>     Change the declaration to:
>     LLViewerObject *objectp = NULL;
> 
>     Crashes on NULL pointers are much easier to debug.
>  
> I'll give it a shot. Should(will) this declaration be edited in the main 
> SL codebase (assuming it works)?

I doubt there'll be a reason to merge this with the official viewer
because it's not a bug and if something is required for your extensions,
you'll need to to do it yourself.

But putting your code inside the loop where it most likely belongs to
anyway, will solve this problem.


Nick



More information about the SLDev mailing list