Browse Source

Fixed a buffer overrun issue

smetz84 3 năm trước cách đây
mục cha
commit
8cb6eba0cf
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      Source/GLS.Scene.pas

+ 2 - 0
Source/GLS.Scene.pas

@@ -6299,6 +6299,8 @@ begin
           CreateContext(AWindowHandle);
       except
         FreeAndNil(FRenderingContext);
+        if Assigned(FCamera) and Assigned(FCamera.FScene) then
+          FCamera.FScene.RemoveBuffer(Self);
         raise;
       end;
     end;