[gnome-documents] toolbar: don't attempt to set an invalid document model
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] toolbar: don't attempt to set an invalid document model
- Date: Fri, 2 Sep 2011 23:16:56 +0000 (UTC)
commit 7ce516e72cbd8f326dafcb659dd33df50c7ca502
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Sep 2 19:11:55 2011 -0400
toolbar: don't attempt to set an invalid document model
src/mainToolbar.js | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index b654582..6157bc8 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -201,6 +201,9 @@ MainToolbar.prototype = {
},
setModel: function(model, document) {
+ if (!this._model || !this._document)
+ return;
+
this._model = model;
this._document = document;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]