Avoid warning about uninitialised variable

cursor_type could be used uninitialised
(probably not, but gcc complains).