[Xfce4-commits] [xfce/xfce4-power-manager] 01/01: Fix a crash on logout (Bug #12465)

noreply at xfce.org noreply at xfce.org
Thu Feb 25 17:44:25 CET 2016


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.

commit 7b1e006c8eaebf16a449b890416f3fea927f6d48
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Thu Feb 25 19:40:49 2016 +0300

    Fix a crash on logout (Bug #12465)
    
    During session shutdown we were in a situation with a NULL model
    which was crashing a crash. Set these to an empty string so xfpm
    properly handles it.
    Reported and fixed by Jaroslav Škarvada.
    
    Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
---
 common/xfpm-power-common.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/common/xfpm-power-common.c b/common/xfpm-power-common.c
index c9df21e..cc3c34d 100644
--- a/common/xfpm-power-common.c
+++ b/common/xfpm-power-common.c
@@ -252,6 +252,11 @@ get_device_description (UpClient *upower, UpDevice *device)
         model = g_strdup ("");
     }
 
+    if (vendor == NULL)
+        vendor = g_strdup ("");
+    if (model == NULL)
+        model = g_strdup ("");
+
     /* If we get a vendor or model we can use it, otherwise translate the
      * device type into something readable (works for things like ac_power)
      */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list