Skip to content

Commit 55f7e62

Browse files
committed
appIndicator: Do not try to initialize an indicator not in stage yet
Even if an indicator is ready we should not try to update it if it's not in stage because we depend on the theme node
1 parent 4f2074f commit 55f7e62

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

appIndicator.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,17 @@ class AppIndicatorsIconActor extends St.Icon {
980980

981981
if (indicator.isReady) {
982982
this._updateCustomIcons();
983-
this._invalidateIcon();
983+
984+
if (this.get_stage()) {
985+
this._invalidateIcon();
986+
} else {
987+
const id = this.connect('parent-set', () => {
988+
if (this.get_stage()) {
989+
this.disconnect(id);
990+
this._invalidateIcon();
991+
}
992+
});
993+
}
984994
}
985995

986996
this.connect('destroy', () => {

0 commit comments

Comments
 (0)