Fix: Check, if signal handler is connected for handler id, before dc.

Do this to hopefully fix "No signal connection XX found" errors.
This commit is contained in:
Julian 2023-01-30 15:28:58 +01:00
parent 40cf8de1a8
commit 40846915e7
Signed by: julian
GPG Key ID: 094C2AC34192FA11

View File

@ -127,7 +127,7 @@ var BoxOrderManager = GObject.registerClass({
*/
disconnectSignals() {
for (const [handlerId, appIndicator] of this.#appIndicatorReadyHandlerIdMap) {
if (handlerId && appIndicator) {
if (handlerId && appIndicator?.signalHandlerIsConnected(handlerId)) {
appIndicator.disconnect(handlerId);
}
}