Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5012)
+++ /CKEditor/trunk/CHANGES.html	(revision 5013)
@@ -75,4 +75,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4824">#4824</a> : [IE] &lt;br/&gt;&nbsp; at the very first table cell breaks the editor selection.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4851">#4851</a> : [IE] Delete table rows with context-menu may cause error.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/4951">#4951</a> : Replacing patterns into empty string throws errors.</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/find/dialogs/find.js
===================================================================
--- /CKEditor/trunk/_source/plugins/find/dialogs/find.js	(revision 5012)
+++ /CKEditor/trunk/_source/plugins/find/dialogs/find.js	(revision 5013)
@@ -311,11 +311,14 @@
 			{
 				var lastCursor,
+						nextRangeWalker,
 						cursors = this._.cursors;
-				if ( !( lastCursor = cursors[ cursors.length - 1 ] ) )
-					return null;
-				return new characterRange(
-										new characterWalker(
-											getRangeAfterCursor( lastCursor ) ),
-										maxLength );
+
+				if ( ( lastCursor = cursors[ cursors.length - 1 ] ) )
+					nextRangeWalker = new characterWalker( getRangeAfterCursor( lastCursor ) );
+				// In case it's an empty range (no cursors), figure out next range from walker (#4951).
+				else
+					nextRangeWalker = this._.walker;
+
+				return new characterRange( nextRangeWalker, maxLength );
 			},
 
