Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/VSTOContrib.Core/RibbonFactory/RibbonFactoryController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ public void Invoke(IRibbonControl control, Expression<Action> caller, params obj
{
var innerEx = e.InnerException;
PreserveStackTrace(innerEx);
if (vstoContribContext.ErrorHandlers.Count == 0)
if (vstoContribContext.ErrorHandlers != null && vstoContribContext.ErrorHandlers.Count == 0)
{
Trace.TraceError(innerEx.ToString());
}

var handled = vstoContribContext.ErrorHandlers.Any(errorHandler => errorHandler.Handle(innerEx));
var handled = vstoContribContext.ErrorHandlers != null && vstoContribContext.ErrorHandlers.Any(errorHandler => errorHandler.Handle(innerEx));

if (!handled)
throw innerEx;
Expand Down Expand Up @@ -213,4 +213,4 @@ public void Dispose()
customTaskPaneRegister.Dispose();
}
}
}
}