summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emulator/src/com/android/tools/idea/device/DeviceView.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/emulator/src/com/android/tools/idea/device/DeviceView.kt b/emulator/src/com/android/tools/idea/device/DeviceView.kt
index 5c0dcd3f07b..8279a2a1d74 100644
--- a/emulator/src/com/android/tools/idea/device/DeviceView.kt
+++ b/emulator/src/com/android/tools/idea/device/DeviceView.kt
@@ -66,6 +66,7 @@ import java.awt.event.MouseAdapter
import java.awt.event.MouseEvent
import java.awt.event.MouseEvent.BUTTON1
import java.awt.geom.AffineTransform
+import java.util.concurrent.CancellationException
import kotlin.math.min
/**
@@ -169,6 +170,9 @@ class DeviceView(
})
deviceClient.startVideoDecoding(decoder)
}
+ catch (_: CancellationException) {
+ // The view has been closed.
+ }
catch (e: Throwable) {
thisLogger().error("Failed to initialize the screen sharing agent", e)
EventQueue.invokeLater {