graphics.newOutline crashing Corona Simulator

local shipOutline = graphics.newOutline( 2, sheet, sheetInfo:getFrameIndex(shipName)) local shipCollisionFilter = { categoryBits = bitTable.ship, maskBits = bitTable.enemyLaser } local shipBodyElement = { filter = shipCollisionFilter} physics.addBody( ship, {outline = shipOutline})

I am trying to use this code to add a physics outline to my ship. It crashes my Corona Simulator (closing it with no error message). What am I doing wrong?

Feeding in the ship image into the physics.addBody() call instead of the ship object fixed this for me.

Feeding in the ship image into the physics.addBody() call instead of the ship object fixed this for me.