[gedit-code-assistance] Keep ref to document in case it gets closed while opening it
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-code-assistance] Keep ref to document in case it gets closed while opening it
- Date: Mon, 17 Feb 2014 13:45:25 +0000 (UTC)
commit 92522d082938476f1654dab03cdc7c73b0dd4632
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Mon Feb 17 14:44:51 2014 +0100
Keep ref to document in case it gets closed while opening it
src/gca-backend.vala | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gca-backend.vala b/src/gca-backend.vala
index be30949..5254754 100644
--- a/src/gca-backend.vala
+++ b/src/gca-backend.vala
@@ -174,7 +174,8 @@ class Backend : Object
foreach (var v in views)
{
- if (v.document == null)
+ var doc = v.document;
+ if (doc == null)
{
// This happens when a document has been closed while we're
// iterating over open views.
@@ -183,8 +184,8 @@ class Backend : Object
var dp = yield unsaved_document(v);
- ret += DBus.OpenDocument(){
- path = v.document.path,
+ ret += DBus.OpenDocument() {
+ path = doc.path,
data_path = (dp == null ? "" : dp)
};
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]