gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/avm2 r9585: Add a useful log_debug and don


From: Tom Stellard
Subject: [Gnash-commit] /srv/bzr/gnash/avm2 r9585: Add a useful log_debug and don't call as_object::get_member on undefined objects.
Date: Sat, 04 Oct 2008 20:03:19 +0800
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9585
committer: Tom Stellard <address@hidden>
branch nick: gnash_dev
timestamp: Sat 2008-10-04 20:03:19 +0800
message:
  Add a useful log_debug and don't call as_object::get_member on undefined 
objects.
modified:
  libcore/vm/Machine.cpp
=== modified file 'libcore/vm/Machine.cpp'
--- a/libcore/vm/Machine.cpp    2008-10-04 11:43:32 +0000
+++ b/libcore/vm/Machine.cpp    2008-10-04 12:03:19 +0000
@@ -1524,7 +1524,8 @@
 ///  value
        case SWF::ABC_ACTION_GETLOCAL:
        {
-               push_stack(mRegisters[mStream->read_V32()]);
+               boost::uint32_t index = mStream->read_V32();
+               push_stack(get_register(index));
                break;
        }
 /// 0x63 ABC_ACTION_SETLOCAL
@@ -1577,8 +1578,9 @@
                //TODO: If multiname is runtime we need to also pop namespace 
and name values of the stack.
                as_value obj = pop_stack();
                as_value val;
-               obj.to_object().get()->get_member(a.getGlobalName(), &val);
-
+               if(!obj.is_undefined()){
+                       obj.to_object().get()->get_member(a.getGlobalName(), 
&val);
+               }
                push_stack(val);
 
                break;


reply via email to

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