gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash/server sprite_instance.cpp


From: strk
Subject: Re: [Gnash-commit] gnash/server sprite_instance.cpp
Date: Wed, 20 Sep 2006 14:21:53 +0200

On Wed, Sep 20, 2006 at 12:08:13PM +0000, Vitaly Alexeev wrote:

> +static void sprite_get_depth(const fn_call& fn)
> +{
> +     assert(dynamic_cast<sprite_instance*>(fn.this_ptr));
> +     sprite_instance* sprite = static_cast<sprite_instance*>(fn.this_ptr);
> +     if (sprite == NULL)
> +     {
> +         sprite = dynamic_cast<sprite_instance*>(fn.env->get_target());
> +     }

I think you copied this snippet from another function of myself,
anyway, looking at it now it has a conceptual bug.
If sprite==NULL is *valid*  (see handling of it), we should NOT
assert dynamic_cast<> to return not-null, unless fn.this_ptr IS not-null.

--strk;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]