Browse Source

Fix NullReferenceException in SDWindowsFormsHost.GetInterface()

pull/32/merge
Daniel Grunwald 12 years ago
parent
commit
0c18d6b4c2
  1. 5
      src/Main/SharpDevelop/WinForms/SDWindowsFormsHost.cs

5
src/Main/SharpDevelop/WinForms/SDWindowsFormsHost.cs

@ -94,7 +94,10 @@ namespace ICSharpCode.SharpDevelop.WinForms @@ -94,7 +94,10 @@ namespace ICSharpCode.SharpDevelop.WinForms
T GetInterface<T>() where T : class
{
T instance = this.ServiceProvider.GetService<T>();
T instance = null;
if (this.ServiceProvider != null) {
instance = this.ServiceProvider.GetService<T>();
}
if (instance == null) {
instance = GetServiceWrapper(GetActiveControl()) as T;
}

Loading…
Cancel
Save