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;
_______________________________________________
Gnash-commit mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-commit