Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 6434)
+++ /CKEditor/trunk/CHANGES.html	(revision 6435)
@@ -54,4 +54,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/4809">#4809</a> : Table related tags are outputted in wrong order.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/7092">#7092</a> : Corrupted toolbar button state for inline style after switch to source.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/7168">#7168</a> : Editor destroying logic flaws.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.ckeditor.com/ticket/7124">#7124</a> : Czech;</li>
Index: /CKEditor/trunk/_source/core/editor.js
===================================================================
--- /CKEditor/trunk/_source/core/editor.js	(revision 6434)
+++ /CKEditor/trunk/_source/core/editor.js	(revision 6435)
@@ -548,7 +548,7 @@
 				this.updateElement();
 
+			this.fire( 'destroy' );
 			this.theme && this.theme.destroy( this );
 
-			this.fire( 'destroy' );
 			CKEDITOR.remove( this );
 			CKEDITOR.fire( 'instanceDestroyed', null, this );
@@ -685,4 +685,5 @@
 		 * @param {Function} callback Function to be called after the setData
 		 *		is completed.
+		 *@param {Boolean} internal Whether suppress  any event firing when copying data internally inside editor.
 		 * @example
 		 * CKEDITOR.instances.editor1.<b>setData</b>( '&lt;p&gt;This is the editor data.&lt;/p&gt;' );
@@ -693,5 +694,5 @@
 		 *     });
 		 */
-		setData : function( data , callback )
+		setData : function( data , callback, internal )
 		{
 			if( callback )
@@ -706,9 +707,9 @@
 			// Fire "setData" so data manipulation may happen.
 			var eventData = { dataValue : data };
-			this.fire( 'setData', eventData );
+			!internal && this.fire( 'setData', eventData );
 
 			this._.data = eventData.dataValue;
 
-			this.fire( 'afterSetData', eventData );
+			!internal && this.fire( 'afterSetData', eventData );
 		},
 
Index: /CKEditor/trunk/_source/plugins/editingblock/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/editingblock/plugin.js	(revision 6434)
+++ /CKEditor/trunk/_source/plugins/editingblock/plugin.js	(revision 6435)
@@ -72,5 +72,5 @@
 					{
 						isHandlingData = true;
-						editor.setData( getMode( editor ).getData() );
+						editor.setData( getMode( editor ).getData(), null, 1 );
 						isHandlingData = false;
 					}
