NetworkMenu: don't pass NULL to nm_utils_ssid_to_utf8
It expects an Array or a ByteArray, and gjs throws in that case. https://bugzilla.gnome.org/show_bug.cgi?id=647040
This commit is contained in:
parent
8232684672
commit
6a27d5ed80
@ -101,8 +101,13 @@ NMNetworkMenuItem.prototype = {
|
|||||||
accessPoints = sortAccessPoints(accessPoints);
|
accessPoints = sortAccessPoints(accessPoints);
|
||||||
this.bestAP = accessPoints[0];
|
this.bestAP = accessPoints[0];
|
||||||
|
|
||||||
let ssid = this.bestAP.get_ssid();
|
if (!title) {
|
||||||
title = title || NetworkManager.utils_ssid_to_utf8(ssid) || _("<unknown>");
|
let ssid = this.bestAP.get_ssid();
|
||||||
|
if (ssid)
|
||||||
|
title = NetworkManager.utils_ssid_to_utf8(ssid);
|
||||||
|
if (!title)
|
||||||
|
title = _("<unknown>");
|
||||||
|
}
|
||||||
|
|
||||||
this._label = new St.Label({ text: title });
|
this._label = new St.Label({ text: title });
|
||||||
this.addActor(this._label);
|
this.addActor(this._label);
|
||||||
|
Loading…
Reference in New Issue
Block a user