Fix possible NPE

seems cursor could be null under some conditions at bootup
Merge pull request #42 from TaichiN/gingerbread

Fix possible NPE