hehe, those questions were for the original author, there might be a chance he will learn something about how to write proper "crash fixes".
dereferencing NULL and then checking "this", casting and then checking for type are both very bad ways to sweep dust under the rug