Fixed a crash

This error has created like hundreds of crashes on the crash archive. Example:
http://crash.pocketmine.net/view/18517