blob: c97b877d12b600f2eff26202556f0d613206b90b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
Description: Don't crash on systems which don't have XBACKLIGHT.
Author: Chris Coulson <chris.coulson@canonical.com>
Bug-Ubuntu: https://launchpad.net/bugs/614039
Bug: http://bugs.gnome.org/627711
Forwarded: yes, http://bugs.gnome.org/attachment.cgi?id=168554
Index: gnome-power-manager-2.31.91/src/gpm-brightness.c
===================================================================
--- gnome-power-manager-2.31.91.orig/src/gpm-brightness.c 2010-09-02 14:54:48.775141000 +1000
+++ gnome-power-manager-2.31.91/src/gpm-brightness.c 2010-09-02 14:54:56.415141000 +1000
@@ -526,6 +526,10 @@
if (!brightness->priv->has_extension)
return FALSE;
+ /* Return immediately if we can't use XRandR */
+ if (!brightness->priv->has_extension)
+ return FALSE;
+
/* do for each screen */
length = brightness->priv->resources->len;
for (i=0; i<length; i++) {
|