summaryrefslogtreecommitdiff
path: root/spice_auto.html
diff options
context:
space:
mode:
authorCédric Bosdonnat <cbosdonnat@suse.com>2019-02-14 10:44:51 +0100
committerJeremy White <jwhite@codeweavers.com>2019-02-14 12:46:08 -0600
commitdf374203dd606faa19c005565432c9028e3106e1 (patch)
tree08cf4550b7c304d04f2ce75ff0b23027f9317075 /spice_auto.html
parentef825431951d995085dd987e8029f438c764df9f (diff)
Fix disconnect() code
The disconnect() function were not checking the existence of the file transfer area element, leading to stop the disconnect() before its end. Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Diffstat (limited to 'spice_auto.html')
-rw-r--r--spice_auto.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/spice_auto.html b/spice_auto.html
index 08db248..71c6556 100644
--- a/spice_auto.html
+++ b/spice_auto.html
@@ -142,7 +142,9 @@
if (window.File && window.FileReader && window.FileList && window.Blob)
{
var spice_xfer_area = document.getElementById('spice-xfer-area');
- document.getElementById('spice-area').removeChild(spice_xfer_area);
+ if (spice_xfer_area != null) {
+ document.getElementById('spice-area').removeChild(spice_xfer_area);
+ }
document.getElementById('spice-area').removeEventListener('dragover', SpiceHtml5.handle_file_dragover, false);
document.getElementById('spice-area').removeEventListener('drop', SpiceHtml5.handle_file_drop, false);
}