Skip to content

Commit

Permalink
Fixed possible null exception in ImGuiManager (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
NinovanderMark authored Jun 18, 2024
1 parent ed37f63 commit 499377c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Generator/Test/EvergineImGUITest/Managers/ImGuiManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ protected override void OnDeactivated()
{
base.OnDeactivated();

var display = this.renderManager.ActiveCamera3D.Display;
var display = this.renderManager.ActiveCamera3D?.Display;
if ( display == null ) {
return;
}

display.DisplaySizeChanged -= this.Display_DisplaySizeChanged;
display.DisplayFrameBufferChanged -= this.Display_DisplayFrameBufferChanged;
this.renderManager.ActiveCamera3D.DrawContext.OnPostRender -= this.DrawContext_OnPostRender;
Expand Down

0 comments on commit 499377c

Please sign in to comment.