mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
[Run-Plugin][Program] Fix null reference exception on Dispose (#11785)
This commit is contained in:
@@ -171,7 +171,11 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_context.API.ThemeChanged -= OnThemeChanged;
|
||||
if (_context != null && _context.API != null)
|
||||
{
|
||||
_context.API.ThemeChanged -= OnThemeChanged;
|
||||
}
|
||||
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user