Catch objectdisposed exception, avoiding a crash when device disappears