Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: NDMF console breaks when an extension context throws an exception #462

Merged
merged 1 commit into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- [#459] "Proxy object was destroyed improperly! Resetting pipeline..." error appears frequently

- [#460] Preview system fails to recover when the primary proxy is destroyed
- [#462] NDMF console fails to appear when an ExtensionContext throws an exception

### Changed

Expand Down
2 changes: 1 addition & 1 deletion Editor/ErrorReporting/UI/ErrorReportWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ private void UpdateContents()
_errorList.style.display = DisplayStyle.Flex;
_errorList.Clear();

var errors = _report.Errors.OrderBy(e => e.Plugin.DisplayName).ToList();
var errors = _report.Errors.OrderBy(e => e.Plugin?.DisplayName).ToList();
PluginBase lastPlugin = null;

foreach (var error in errors)
Expand Down
7 changes: 5 additions & 2 deletions Editor/ErrorReporting/UI/GroupHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public GroupHeader(PluginBase plugin)
var titleElem = this.Q<Label>("group-title");
var imageElem = this.Q<Image>("group-logo");

if (plugin.LogoTexture != null)
if (plugin?.LogoTexture != null)
{
imageElem.image = plugin.LogoTexture;
titleElem.style.display = DisplayStyle.None;
Expand All @@ -36,10 +36,13 @@ public GroupHeader(PluginBase plugin)
imageElem.style.height = height;
#endif
}
else
else if (plugin != null)
{
imageElem.style.display = DisplayStyle.None;
titleElem.text = plugin.DisplayName;
} else {
imageElem.style.display = DisplayStyle.None;
titleElem.text = "???";
}
}
}
Expand Down
Loading