SOLVED [Fault] exception, information=TypeError: Error #1009


(Den) #1

Hey guys! I started to work with flashpunk in FlashDevelop. Get

 [Fault] exception, information=TypeError: Error #1009: Cannot access a property or method of a null object reference. 
  at net.flashpunk::World/updateLists()[E:\My\Prot\src\net\flashpunk\World.as:942]
  at net.flashpunk::Engine/update()[E:\My\Prot\src\net\flashpunk\Engine.as:98]
  at net.flashpunk::Engine/onEnterFrame()[E:\My\Prot\src\net\flashpunk\Engine.as:211]

Before operations with entities do check for the existence of entities: if(entity){…}


(Jacob Albano) #2

Looks like you tried to add a null entity to the world.


(Den) #3

Thanks for the tip! In my case was the removal of entities that do not exist yet