safeguard npe

This commit is contained in:
Joao Moreno
2017-07-25 10:45:45 +02:00
parent 80a83ff8d9
commit 9a30b98880
+1 -1
View File
@@ -517,7 +517,7 @@ Terminal.prototype.initGlobal = function() {
on(this.element, 'copy', event => { on(this.element, 'copy', event => {
// If mouse events are active it means the selection manager is disabled and // If mouse events are active it means the selection manager is disabled and
// copy should be handled by the host program. // copy should be handled by the host program.
if (!this.selectionManager.hasSelection) { if (!term.hasSelection) {
return; return;
} }
copyHandler(event, term, this.selectionManager); copyHandler(event, term, this.selectionManager);