[gnome-documents/gnome-3-20] view: don't use invalid iters when activating first result
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/gnome-3-20] view: don't use invalid iters when activating first result
- Date: Mon, 19 Jun 2017 22:12:25 +0000 (UTC)
commit 6d5f9023bf23b1f6765f8439faeb4021b5abf24f
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Aug 7 14:58:35 2016 -0700
view: don't use invalid iters when activating first result
src/view.js | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/view.js b/src/view.js
index f9d9b1d..56e0be9 100644
--- a/src/view.js
+++ b/src/view.js
@@ -461,8 +461,8 @@ const ViewContainer = new Lang.Class({
_getFirstDocument: function() {
let doc = null;
- let iter = this._model.get_iter_first()[1];
- if (iter) {
+ let [success, iter] = this._model.get_iter_first();
+ if (success) {
let id = this._model.get_value(iter, Gd.MainColumns.ID);
doc = Application.documentManager.getItemById(id);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]