checks if the cursors is closed first

interesting little details matter.. not the right solution but it will
at least not crash..