[haiku-commits] haiku: hrev53669 - src/apps/haiku3d

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 31 Dec 2019 12:42:34 -0500 (EST)

hrev53669 adds 1 changeset to branch 'master'
old head: 755a88de68622b269053606cfa0b0b9d8881ee9c
new head: 1a221bf3d329ca3d4df274e45452a7521a37be2e
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=1a221bf3d329+%5E755a88de6862

----------------------------------------------------------------------------

1a221bf3d329: haiku3d: fix crash on exit
  
  Change-Id: I0d3d5d333f1dad5818149cde0fed29797f12e825
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/2062
  Reviewed-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>

                                              [ X512 <danger_mail@xxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53669
Commit:      1a221bf3d329ca3d4df274e45452a7521a37be2e
URL:         https://git.haiku-os.org/haiku/commit/?id=1a221bf3d329
Author:      X512 <danger_mail@xxxxxxx>
Date:        Tue Dec 31 16:29:32 2019 UTC
Committer:   Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Commit-Date: Tue Dec 31 17:42:31 2019 UTC

----------------------------------------------------------------------------

2 files changed, 11 insertions(+), 2 deletions(-)
src/apps/haiku3d/RenderView.cpp | 12 ++++++++++--
src/apps/haiku3d/RenderView.h   |  1 +

----------------------------------------------------------------------------

diff --git a/src/apps/haiku3d/RenderView.cpp b/src/apps/haiku3d/RenderView.cpp
index 6773590a07..4afe5e2685 100644
--- a/src/apps/haiku3d/RenderView.cpp
+++ b/src/apps/haiku3d/RenderView.cpp
@@ -38,8 +38,6 @@ RenderView::RenderView(BRect frame)
 
 RenderView::~RenderView()
 {
-       _StopRenderThread();
-       _DeleteScene();
 }
 
 
@@ -55,6 +53,16 @@ RenderView::AttachedToWindow()
 }
 
 
+void
+RenderView::DetachedFromWindow()
+{
+       _StopRenderThread();
+       _DeleteScene();
+
+       BGLView::DetachedFromWindow();
+}
+
+
 uint32
 RenderView::_CreateRenderThread()
 {
diff --git a/src/apps/haiku3d/RenderView.h b/src/apps/haiku3d/RenderView.h
index 65e23e2617..b114474e9d 100644
--- a/src/apps/haiku3d/RenderView.h
+++ b/src/apps/haiku3d/RenderView.h
@@ -23,6 +23,7 @@ public:
                                        ~RenderView();
 
        virtual void    AttachedToWindow();
+       virtual void    DetachedFromWindow();
        virtual void    FrameResized(float width, float height);
        virtual void    ErrorCallback(unsigned long error);
 


Other related posts:

  • » [haiku-commits] haiku: hrev53669 - src/apps/haiku3d - Axel Dörfler