Fix critical when setting a NULL label

st_label_set_text() does not accept NULL, and emits a g_critical
in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=654638
This commit is contained in:
Giovanni Campagna 2011-08-01 16:14:23 +02:00
parent d27b37fefe
commit e01baf2a25

View File

@ -674,7 +674,7 @@ NMDevice.prototype = {
let dev_product = this.device.get_product();
let dev_vendor = this.device.get_vendor();
if (!dev_product || !dev_vendor)
return null;
return '';
let product = Util.fixupPCIDescription(dev_product);
let vendor = Util.fixupPCIDescription(dev_vendor);