Index: components/editor/gtkhtml-editor-actions.c
===================================================================
--- components/editor/gtkhtml-editor-actions.c	(revision 8827)
+++ components/editor/gtkhtml-editor-actions.c	(working copy)
@@ -172,8 +172,9 @@ insert_html_file_response_cb (GtkFileCho
 	filename = gtk_file_chooser_get_filename (file_chooser);
 
 	/* Assume the file encoding is UTF-8. */
-	gtkhtml_editor_get_file_contents (
-		filename, NULL, &contents, &length, &error);
+	if (!gtkhtml_editor_get_file_contents (
+		filename, NULL, &contents, &length, &error) && !error)
+		return;
 
 	/* If we get a conversion error, look for a charset and try again. */
 	if (error != NULL && g_error_matches (error, G_CONVERT_ERROR,
@@ -264,8 +265,9 @@ insert_text_file_response_cb (GtkFileCho
 	filename = gtk_file_chooser_get_filename (file_chooser);
 
 	/* Assume the file encoding is UTF-8. */
-	gtkhtml_editor_get_file_contents (
-		filename, NULL, &contents, &length, &error);
+	if (!gtkhtml_editor_get_file_contents (
+		filename, NULL, &contents, &length, &error) && !error)
+		return;
 
 	/* If we get a conversion error, look for a charset and try again. */
 	if (error != NULL && g_error_matches (error, G_CONVERT_ERROR,
Index: components/editor/ChangeLog
===================================================================
--- components/editor/ChangeLog	(revision 8827)
+++ components/editor/ChangeLog	(working copy)
@@ -1,3 +1,11 @@
+2008-04-24  Milan Crha  <mcrha@redhat.com>
+
+	** Fixes bug #527549
+
+	* gtkhtml-editor-actions.c: (insert_html_file_response_cb),
+	(insert_text_file_response_cb): Do not try to add file when the
+	helper function returns false but doesn't set error.
+
 2008-04-17  Matthew Barnes  <mbarnes@redhat.com>
 
 	** Fixes bug #528401
