Otherwise the contents of the bitmap can be undefined if the cursor image is null. (cherry picked from commit 52bc4606)