Fix various asset windows shutdown when editor is disposing during crash
This commit is contained in:
@@ -289,6 +289,10 @@ namespace FlaxEditor.Windows.Assets
|
||||
/// <inheritdoc />
|
||||
public override void OnDestroy()
|
||||
{
|
||||
if (IsDisposing)
|
||||
return;
|
||||
base.OnDestroy();
|
||||
|
||||
if (_previewSource)
|
||||
{
|
||||
_preview.Source = null;
|
||||
@@ -297,8 +301,6 @@ namespace FlaxEditor.Windows.Assets
|
||||
_previewSource = null;
|
||||
}
|
||||
FlaxEngine.Object.Destroy(ref _previewScene);
|
||||
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user