Merge pull request #1 from bjorn/master

Some fixes
Fixed segfault
Merge branch 'master' of https://github.com/neagix/smw-next
Fixed on startup of worldeditor