OpenByteDev / burnt-sushi

Spotify AdBlocker for Windows
MIT License
266 stars 10 forks source link

Avoid some crashes in the process scanner thread #16

Closed guihkx closed 3 months ago

guihkx commented 6 months ago

get_window_process() can fail for many reasons, one of them being lack of permission to inject into some processes.

Before this change, the process scanner thread could crash by simply launching the Task Manager (taskmgr.exe), before we injected into Spotify.

I also added a check for event.window_handle(), just to be safe.

Fixes #15