Skip to content

Commit

Permalink
Delete reference to removed object
Browse files Browse the repository at this point in the history
This prevents calling a C function with an old pointer from the JS
timeout callback which then crashes the GNOME Shell.
An upstream fix was also sent in which prevents the crash of GNOME
Shell but still this bug here needs to be fixed.

Fixes kgshank#110 kgshank#108
  • Loading branch information
pothos committed Jan 4, 2021
1 parent 7422ac6 commit 39e7c1d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound-output-device-chooser@kgshank.net/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ var SoundDeviceChooserBase = class SoundDeviceChooserBase{

_deviceRemoved(control, id, dontcheck) {
let obj = this._devices[id];
this._devices[id] = null;
if(obj && obj.active) {
_d("Removed: " + id);
if(!dontcheck && this._canShowDevice(obj.uidevice, false)) {
Expand Down

0 comments on commit 39e7c1d

Please sign in to comment.