[sushi] mainwindow: make sure not to call toolbar methods when there's none
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi] mainwindow: make sure not to call toolbar methods when there's none
- Date: Wed, 11 May 2011 19:01:48 +0000 (UTC)
commit fd8de18eccb03db14c9cf0a33808bcce49b0204c
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed May 11 14:59:18 2011 -0400
mainwindow: make sure not to call toolbar methods when there's none
src/js/ui/mainWindow.js | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index 49b5e03..b227bc5 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -307,8 +307,10 @@ MainWindow.prototype = {
_exitFullScreen : function() {
this._isFullScreen = false;
- this._toolbarActor.set_opacity(0);
- this._removeToolbarTimeout();
+ if (this._toolbarActor) {
+ this._toolbarActor.set_opacity(0);
+ this._removeToolbarTimeout();
+ }
/* wait for the next stage allocation to fade in the texture
* and background again.
@@ -375,9 +377,11 @@ MainWindow.prototype = {
_enterFullScreen : function() {
this._isFullScreen = true;
- /* prepare the toolbar */
- this._toolbarActor.set_opacity(0);
- this._removeToolbarTimeout();
+ if (this._toolbarActor) {
+ /* prepare the toolbar */
+ this._toolbarActor.set_opacity(0);
+ this._removeToolbarTimeout();
+ }
/* wait for the next stage allocation to fade in the texture
* and background again.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]