From d257e9e1e846466cf0142e1415ec0a97504fd92b Mon Sep 17 00:00:00 2001 From: sirhamsteralot Date: Fri, 13 Apr 2018 20:45:41 +0200 Subject: [PATCH] Fixed crash when plugin doesnt use UI --- Torch.Server/ViewModels/PluginViewModel.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Torch.Server/ViewModels/PluginViewModel.cs b/Torch.Server/ViewModels/PluginViewModel.cs index d926cc2..21fe310 100644 --- a/Torch.Server/ViewModels/PluginViewModel.cs +++ b/Torch.Server/ViewModels/PluginViewModel.cs @@ -32,6 +32,9 @@ namespace Torch.Server.ViewModels public void UpdateResourceDict(ResourceDictionary dictionary) { + if (this.Control == null) + return; + this.Control.Resources.MergedDictionaries.Clear(); this.Control.Resources.MergedDictionaries.Add(dictionary); }