File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ class AudioOutputSwitcherExtension {
261261 this . _manager = null ;
262262 this . _keybindingAction = null ;
263263 this . _popup = null ;
264+ this . _popupDestroyId = 0 ;
264265 }
265266
266267 enable ( ) {
@@ -278,6 +279,10 @@ class AudioOutputSwitcherExtension {
278279 this . _removeKeybinding ( ) ;
279280
280281 if ( this . _popup ) {
282+ if ( this . _popupDestroyId ) {
283+ this . _popup . disconnect ( this . _popupDestroyId ) ;
284+ this . _popupDestroyId = 0 ;
285+ }
281286 this . _popup . destroy ( ) ;
282287 this . _popup = null ;
283288 }
@@ -332,9 +337,11 @@ class AudioOutputSwitcherExtension {
332337
333338 const popup = new OutputSwitcherPopup ( outputs , this . _keybindingAction , this . _manager ) ;
334339 this . _popup = popup ;
335- popup . connect ( 'destroy' , ( ) => {
336- if ( this . _popup === popup )
340+ this . _popupDestroyId = popup . connect ( 'destroy' , ( ) => {
341+ if ( this . _popup === popup ) {
337342 this . _popup = null ;
343+ this . _popupDestroyId = 0 ;
344+ }
338345 } ) ;
339346
340347 const shown = popup . show (
You can’t perform that action at this time.
0 commit comments