[gnome-dvb-daemon/gst-1.0] Fixed crash if ID_MODEL_FROM_DATABASE property is not available



commit 23178c3582467926904381109b0c26e6e76ae0f0
Author: Sebastian Pölsterl <poelster in tum de>
Date:   Tue Jul 22 10:16:19 2014 -0400

    Fixed crash if ID_MODEL_FROM_DATABASE property is not available

 src/Device.vala |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/Device.vala b/src/Device.vala
index d10e015..abec7e1 100644
--- a/src/Device.vala
+++ b/src/Device.vala
@@ -68,9 +68,11 @@ namespace DVB {
             string name = this.Name;
 
             string tmp = parent.get_property ("ID_MODEL_FROM_DATABASE");
-            tmp += ": " + name;
-            this.Name = tmp;
-            log.debug("Adding Device: %s", tmp);
+            if (tmp == null)
+                this.Name = name;
+            else
+                this.Name = tmp + ": " + name;
+            log.debug("Adding Device: %s", this.Name);
             this.DevFile = dev_file;
 
             /* Generating UID */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]