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