21 lines
858 B
Diff
21 lines
858 B
Diff
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++) {
|