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,
GnomeBluetooth.Column.TRUSTED);
if (!isPaired && !isTrusted)
continue;
if (isPaired || isTrusted) {
deviceInfos.push({
connected: this._model.get_value(iter,
GnomeBluetooth.Column.CONNECTED),
name: this._model.get_value(iter,
GnomeBluetooth.Column.ALIAS),
});
}
ret = this._model.iter_next(iter);
}