[gtkhtml] Bug 624149 - Check for NULL after gtkhtml_editor_run_open_dialog()
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkhtml] Bug 624149 - Check for NULL after gtkhtml_editor_run_open_dialog()
- Date: Mon, 12 Jul 2010 10:38:55 +0000 (UTC)
commit 36e7980ac93a823632c42052180bf162bf91aeaf
Author: Matthew Barnes <mbarnes redhat com>
Date: Mon Jul 12 06:37:15 2010 -0400
Bug 624149 - Check for NULL after gtkhtml_editor_run_open_dialog()
components/editor/gtkhtml-editor-actions.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/components/editor/gtkhtml-editor-actions.c b/components/editor/gtkhtml-editor-actions.c
index 96c057b..d69684d 100644
--- a/components/editor/gtkhtml-editor-actions.c
+++ b/components/editor/gtkhtml-editor-actions.c
@@ -614,6 +614,10 @@ action_insert_html_file_cb (GtkToggleAction *action,
file = gtkhtml_editor_run_open_dialog (
editor, _("Insert HTML File"), NULL, NULL);
+ /* User cancelled? */
+ if (file == NULL)
+ return;
+
/* XXX Need a way to cancel this. */
g_file_load_contents_async (
file, NULL, (GAsyncReadyCallback)
@@ -679,6 +683,10 @@ action_insert_text_file_cb (GtkAction *action,
file = gtkhtml_editor_run_open_dialog (
editor, _("Insert Text File"), NULL, NULL);
+ /* User cancelled? */
+ if (file == NULL)
+ return;
+
/* XXX Need a way to cancel this. */
g_file_load_contents_async (
file, NULL, (GAsyncReadyCallback)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]