[mutter/gnome-3-24] monitor-manager: Fix crash when UPower is not available
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-24] monitor-manager: Fix crash when UPower is not available
- Date: Wed, 31 May 2017 14:13:50 +0000 (UTC)
commit 2ec91abf38b3b055a735318c45f7e38d9408c1be
Author: Bastien Nocera <hadess hadess net>
Date: Wed May 31 15:17:01 2017 +0200
monitor-manager: Fix crash when UPower is not available
Don't access the upower client if it doesn't exist
https://bugzilla.gnome.org/show_bug.cgi?id=780407
src/backends/meta-monitor-manager.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index 0d1bb05..eecef77 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -260,6 +260,9 @@ lid_is_closed_changed (UpClient *client,
static gboolean
meta_monitor_manager_real_is_lid_closed (MetaMonitorManager *manager)
{
+ if (!manager->up_client)
+ return FALSE;
+
return up_client_get_lid_is_closed (manager->up_client);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]