From 7fb766560880ea410e10fb9d60fb2cb387199fe1 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Tue, 27 Aug 2013 09:34:55 -0400 Subject: [PATCH] Avoid crash after ve.dm.Surface.purgeHistory(). The selection property is never null; it is initialized to Range(0,0). If it is set to null in purgeHistory(), the next call to ve.dm.Surface.change() will crash. Change-Id: Ia45c0ba26291e8ad09c445fdf2323710b5ab409f --- modules/ve/dm/ve.dm.Surface.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve/dm/ve.dm.Surface.js b/modules/ve/dm/ve.dm.Surface.js index c8dfc1ddb0..db27b5ac11 100644 --- a/modules/ve/dm/ve.dm.Surface.js +++ b/modules/ve/dm/ve.dm.Surface.js @@ -125,7 +125,7 @@ ve.dm.Surface.prototype.purgeHistory = function () { if ( !this.enabled ) { return; } - this.selection = null; + this.selection = new ve.Range( 0, 0 ); this.smallStack = []; this.bigStack = []; this.undoIndex = 0;