[gnome-shell] Fix critical when setting a NULL label
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Fix critical when setting a NULL label
- Date: Mon, 1 Aug 2011 14:40:38 +0000 (UTC)
commit e01baf2a2542e10807a724621098b010a0c4a799
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon Aug 1 16:14:23 2011 +0200
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
js/ui/status/network.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index a4372b5..a4081ff 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]