bluetooth: Fix infinite loop

Bailing out early of the loop means the iter is never increased,
resulting in an infinite loop.

Fixes 26c2cb9f6.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1165
This commit is contained in:
Florian Müllner 2020-04-02 12:42:41 +02:00 committed by Georges Basile Stavracas Neto
parent e138b6e3af
commit 5067bda61a

View File

@ -84,15 +84,14 @@ class Indicator extends PanelMenu.SystemIndicator {
const isTrusted = this._model.get_value(iter, const isTrusted = this._model.get_value(iter,
GnomeBluetooth.Column.TRUSTED); GnomeBluetooth.Column.TRUSTED);
if (!isPaired && !isTrusted) if (isPaired || isTrusted) {
continue; deviceInfos.push({
connected: this._model.get_value(iter,
deviceInfos.push({ GnomeBluetooth.Column.CONNECTED),
connected: this._model.get_value(iter, name: this._model.get_value(iter,
GnomeBluetooth.Column.CONNECTED), GnomeBluetooth.Column.ALIAS),
name: this._model.get_value(iter, });
GnomeBluetooth.Column.ALIAS), }
});
ret = this._model.iter_next(iter); ret = this._model.iter_next(iter);
} }