mirror of
https://gitlab.gnome.org/julianschacher/top-bar-organizer.git
synced 2025-10-27 15:19:09 +00:00
Fix: Extension crashing, when no associatedRole can be found
There are situations, where no `associatedRole` for a given `indicatorContainer` can be found (e.g. the GameMode GNOME Shell Extension seems to cause such a situation, when you have it enabled and lock and unlock GNOME). Previously this would crash the extension. With this fix, those `indicatorContainer`s just get ignored.
This commit is contained in:
parent
e76b24e813
commit
03fb3355b4
@ -353,6 +353,7 @@ class Extension {
|
|||||||
// First get the role associated with the current indicator
|
// First get the role associated with the current indicator
|
||||||
// container.
|
// container.
|
||||||
const associatedRole = indicatorContainerRoleMap.get(indicatorContainer);
|
const associatedRole = indicatorContainerRoleMap.get(indicatorContainer);
|
||||||
|
if (!associatedRole) continue;
|
||||||
|
|
||||||
// Handle an AppIndicator/KStatusNotifierItem item differently.
|
// Handle an AppIndicator/KStatusNotifierItem item differently.
|
||||||
if (associatedRole.startsWith("appindicator-")) {
|
if (associatedRole.startsWith("appindicator-")) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user