Cursor mask was uninitialized data, causing problems.

Fixes Bugzilla #1461.