[dasher: 57/217] Fix a crash on startup on Gtk2
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher: 57/217] Fix a crash on startup on Gtk2
- Date: Sat, 27 Feb 2016 12:05:07 +0000 (UTC)
commit 6bedda14585e404f59a3f833fc925e8b2ff25a2d
Author: Laetitia Baudoin <lbaudoin google com>
Date: Tue Oct 13 05:14:19 2015 -0700
Fix a crash on startup on Gtk2
Src/Gtk2/dasher_editor.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/Src/Gtk2/dasher_editor.cpp b/Src/Gtk2/dasher_editor.cpp
index 9480bd1..9f53546 100644
--- a/Src/Gtk2/dasher_editor.cpp
+++ b/Src/Gtk2/dasher_editor.cpp
@@ -713,7 +713,10 @@ dasher_editor_get_filename(DasherEditor *pSelf) {
const gchar *
dasher_editor_get_all_text(DasherEditor *pSelf) {
DasherEditorPrivate *pPrivate = DASHER_EDITOR_GET_PRIVATE(pSelf);
-
+ if (pPrivate == NULL) {
+ // This function can be called before pPrivate is set.
+ return "";
+ }
GtkTextIter oStart;
GtkTextIter oEnd;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]