[gnome-shell] AllView: prevent accessing a NULL effect
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] AllView: prevent accessing a NULL effect
- Date: Fri, 26 Jun 2015 16:24:47 +0000 (UTC)
commit 7bdd1c625c982c43847d5dbbe2c5250ac1726586
Author: Rui Matos <tiagomatos gmail com>
Date: Wed Jun 10 16:05:41 2015 +0200
AllView: prevent accessing a NULL effect
In some cases we might be allocated a size such that
this._grid.topPadding and this._grid.bottomPadding are both 0 which
means that the ScrollView fade effect gets removed. In that case don't
try to access the effect since it will be NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=750714
js/ui/appDisplay.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index c938e1f..37cc5eb 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -753,7 +753,8 @@ const AllView = new Lang.Class({
let fadeOffset = Math.min(this._grid.topPadding,
this._grid.bottomPadding);
this._scrollView.update_fade_effect(fadeOffset, 0);
- this._scrollView.get_effect('fade').fade_edges = true;
+ if (fadeOffset > 0)
+ this._scrollView.get_effect('fade').fade_edges = true;
if (this._availWidth != availWidth || this._availHeight != availHeight || oldNPages !=
this._grid.nPages()) {
this._adjustment.value = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]