HI!
I found a bug.
steps to crash.
1) make a power line on the ground.
2) remove power line by bulldozer tool.
3) press Z key (undo)
----------------------------------------------------------------
[ simplay.cc ]
<<< original >>>
sint64 spieler_t::undo()
{
...
leitung_t* lt = gr->get_leitung();
cost += lt->get_besch()->get_preis();
...
}
<<< my first aid >>>
sint64 spieler_t::undo()
{
...
leitung_t* lt = gr->get_leitung();
if(!lt) continue; // add NULL check.
cost += lt->get_besch()->get_preis();
...
}
----------------------------------------------------------------
[ environment ]
os : Windows7 x64
compiler : Visual C/C++2010 express
simutrans : r5787 / GDI / Win32 Debug / compiled from source code.
pak : pak64 111.3 / SVN / makeobj=53
libs : zlib 1.2.7 / libpng 1.5.11 / bzip2 1.0.6
----------------------------------------------------------------
Thank you!
Thank you very much for the report & fix. Incorporated in r5788.
Thank you and welcome to the International Simutrans Forum. :)