Index: /FCKeditor/branches/versions/2.4.x/editor/_source/classes/fckenterkey.js
===================================================================
--- /FCKeditor/branches/versions/2.4.x/editor/_source/classes/fckenterkey.js	(revision 376)
+++ /FCKeditor/branches/versions/2.4.x/editor/_source/classes/fckenterkey.js	(revision 377)
@@ -531,8 +531,8 @@
 FCKEnterKey.prototype._AppendBogusBr = function( element )
 {
-	var eLastChild = element.getElementsByTagName('br') ;
-
-	if ( eLastChild )
-		eLastChild = eLastChild[ eLastChild.legth - 1 ] ;
+	if ( !element )
+		return ;
+
+	var eLastChild = FCKTools.GetLastItem( element.getElementsByTagName('br') ) ;
 
 	if ( !eLastChild || eLastChild.getAttribute( 'type', 2 ) != '_moz' )
Index: /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fcktools.js
===================================================================
--- /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fcktools.js	(revision 376)
+++ /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fcktools.js	(revision 377)
@@ -224,2 +224,10 @@
 	return new fCloneCreator ;
 }
+
+FCKTools.GetLastItem = function( list )
+{
+	if ( list.length > 0 )
+		return list[ list.length - 1 ] ;
+
+	return null ;
+}
