b2Body.Merge throws null reference exception

I might be doing something wrong or calling things in an incorrect state, but when I call body1.Merge(body2) I get an exception. Looking at the code the variable body1 and body2 are not set until line 587 but at line 584 body1's fixture count is set.

Code:
   public function Merge(other:b2Body):void
   {
      var f:b2Fixture;
      for (f = other.m_fixtureList; f; )
      {
         var next:b2Fixture = f.m_next;
         
         // Remove fixture
         other.m_fixtureCount--;
         
         // Add fixture
         f.m_next = m_fixtureList;
         m_fixtureList = f;
         m_fixtureCount++;
         
         f.m_body = body2; // << body2 isn't set either, this doesn't seem right
         
         f = next;
      }
      body1.m_fixtureCount = 0; // << problem line
      
      // Recalculate velocities
      var body1:b2Body = this;
      var body2:b2Body = other;
      
      // Compute consistent velocites for new bodies based on cached velocity
      var center1:b2Vec2 = body1.GetWorldCenter();
      var center2:b2Vec2 = body2.GetWorldCenter();
      
      var velocity1:b2Vec2 = body1.GetLinearVelocity().Copy();
      var velocity2:b2Vec2 = body2.GetLinearVelocity().Copy();
      
      var angular1:Number = body1.GetAngularVelocity();
      var angular:Number = body2.GetAngularVelocity();
      
      // TODO
      
      body1.ResetMassData();
      
      SynchronizeFixtures();
   }
yeah i have the same problems
edit like this?????
var body1:b2Body=this;
var body2:b2Body=other;

var f:b2Fixture;
for (f=other.m_fixtureList; f; ) {
var next:b2Fixture=f.m_next;

// Remove fixture
other.m_fixtureCount--;

// Add fixture
//f.m_next=m_fixtureList;
// this.DestroyFixture(this.m_fixtureList);
this.m_fixtureList=f;
m_fixtureCount++;

f=next;
}
Did anyone find a reason for this?
I can't figure out if it's in the B2Body class or not. My reference to the bodies are returning correctly....
I can merge bodies through getting the fixtureDef and copying all attributes, except the position (which is obtained through the body and applied to the verticies).
If anyone can shed some light on this, please let me know....

Original thread: https://box2d.org/forum/viewtopic.php?t=5235