Skip to content

Commit

Permalink
[#14613] prevent plugin initialization if editor was already destroye…
Browse files Browse the repository at this point in the history
…d (race condition)
  • Loading branch information
brian-mcnamara committed May 4, 2016
1 parent ccd0038 commit 51681aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,10 @@

// Load all plugin specific language files in a row.
CKEDITOR.scriptLoader.load( languageFiles, function() {
//Ensure the editor has not been destroyed in the mean time
if (editor.status === 'destroyed') {
return;
}
// Initialize all plugins that have the "beforeInit" and "init" methods defined.
var methods = [ 'beforeInit', 'init', 'afterInit' ];
for ( var m = 0; m < methods.length; m++ ) {
Expand Down

0 comments on commit 51681aa

Please sign in to comment.