[gnome-builder] editor: don't load file-marks if we don't have a GFile
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor: don't load file-marks if we don't have a GFile
- Date: Sun, 12 Oct 2014 21:52:26 +0000 (UTC)
commit dcbbe8d7ab81d9aa7bd3434c2f31c2c220dd2d51
Author: Christian Hergert <christian hergert me>
Date: Sun Oct 12 17:52:21 2014 -0400
editor: don't load file-marks if we don't have a GFile
Fixes some warnings on opening a new tab.
src/editor/gb-editor-tab.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-tab.c b/src/editor/gb-editor-tab.c
index 6dc2872..91f1794 100644
--- a/src/editor/gb-editor-tab.c
+++ b/src/editor/gb-editor-tab.c
@@ -1338,6 +1338,9 @@ gb_editor_tab_load_file_mark (GbEditorTab *tab)
}
file = gtk_source_file_get_location (tab->priv->file);
+ if (!file)
+ return;
+
marks = gb_editor_file_marks_get_default ();
mark = gb_editor_file_marks_get_for_file (marks, file);
@@ -1367,6 +1370,8 @@ gb_editor_tab_save_file_mark (GbEditorTab *tab)
gtk_text_buffer_get_iter_at_mark (buffer, &iter, insert);
file = gtk_source_file_get_location (tab->priv->file);
+ if (!file)
+ return;
marks = gb_editor_file_marks_get_default ();
mark = gb_editor_file_marks_get_for_file (marks, file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]