Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5104)
+++ /CKEditor/trunk/CHANGES.html	(revision 5105)
@@ -91,4 +91,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4886">#4886</a> : Extra BR tags were being created in the output HTML.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4933">#4933</a> : Empty tags with BR were being left in the DOM.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/5127">#5127</a> : Remove dialog definition pages somtimes been error prone.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.fckeditor.net/ticket/5006">#5006</a> : Dutch;</li>
Index: /CKEditor/trunk/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 5104)
+++ /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 5105)
@@ -950,5 +950,6 @@
 		getContentElement : function( pageId, elementId )
 		{
-			return this._.contents[pageId][elementId];
+			var page = this._.contents[ pageId ];
+			return page && page[ elementId ];
 		},
 
