[gtkhtml/gnome-2-30] 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/gnome-2-30] Bug 624149 - Check for NULL after gtkhtml_editor_run_open_dialog()
- Date: Mon, 12 Jul 2010 10:40:06 +0000 (UTC)
commit 43fbc27997dd9d8618e9c2a53d4d254d77366f0f
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 e495fca..0fbdafc 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]