Check that we have a cursor to restore

Forgot to check that we actually have a cursor from the server
before trying to switch back to it after dismissing the context menu.
1 file changed