[0.8.8] Mod-triggered null pointer dereference
Posted: Mon Feb 10, 2014 11:26 am
I ran into a null pointer dereference crash while trying to make a mod.
Steps to reproduce:
Update: the crash is caused by the furnace-like entity not having a "placeable-player" or "placeable-neutral" flag.
Steps to reproduce:
- Download the mod (attached to this post) and install it.
- Start a new game.
- Spawn some items:
Code: Select all
game.getplayer().getinventory(defines.inventory.playermain).insert{name="crash-trigger-entity", count=1} game.getplayer().getinventory(defines.inventory.playermain).insert{name="small-electric-pole", count=1} game.getplayer().getinventory(defines.inventory.playermain).insert{name="solar-panel", count=1}
- Place the electric pole. Place the solar panel and crash trigger entity within range of the electric pole.
- Right-click the electric pole.
- Crash!
Update: the crash is caused by the furnace-like entity not having a "placeable-player" or "placeable-neutral" flag.