mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[Run-Plugin][Program] Fix null reference exception on Dispose (#11785)
This commit is contained in:
@@ -210,8 +210,12 @@ namespace Microsoft.Plugin.Program
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_context.API.ThemeChanged -= OnThemeChanged;
|
||||
_win32ProgramRepositoryHelper.Dispose();
|
||||
if (_context != null && _context.API != null)
|
||||
{
|
||||
_context.API.ThemeChanged -= OnThemeChanged;
|
||||
}
|
||||
|
||||
_win32ProgramRepositoryHelper?.Dispose();
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user