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

Michael Miller 1337mail at gmail.com
Wed Oct 3 21:12:56 PDT 2007


Jason,My apologies, but I am unable to understand fully what you mean. I
understand that a pointer may be pointing to nothing(but even if(&objectp &&
objectp->isAvatar()) doesn't work). How would I make use of an LLPointer?
Would this really help?

Thanks,
Mike

On 10/3/07, Jason Giglio <gigstaggart at gmail.com> wrote:
>
> Michael Miller wrote:
> > if(objectp && objectp->isAvatar()){
> > // Do stuff here
> > }
> >
> > The problem lies in the objectp->isAvatar(). I've run this through
> > gdb(I'm on Mac OSX "non-10.4 platform"), and the isAvatar() method keeps
> > throwing EXEC_BAD_ACCESS exceptions whenever the method is run(when
> > calling isAvatar()). Is this because the objectp variable is "destroyed"
> > or otherwise made inaccessible? How might I remedy this problem?
>
> You are checking to see if it's NULL, so it's not...  Looks like it's a
> dangling pointer.  You somehow what objectp points to without nulling
> the pointer.
>
> Hint:  Use a smart pointer (LLPointer) class and this won't happen
> nearly as much.
>
> -Jason
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20071004/c9e22a8f/attachment.htm


More information about the SLDev mailing list