Browse Source

display: fix segfault when output is removed during render

Fixes: #176
rdb 8 years ago
parent
commit
bb60e8c373
2 changed files with 4 additions and 4 deletions
  1. 2 2
      panda/src/display/graphicsEngine.cxx
  2. 2 2
      panda/src/display/graphicsEngine.h

+ 2 - 2
panda/src/display/graphicsEngine.cxx

@@ -1271,7 +1271,7 @@ set_window_sort(GraphicsOutput *window, int sort) {
  * model begins with the "-" character.
  */
 void GraphicsEngine::
-cull_and_draw_together(const GraphicsEngine::Windows &wlist,
+cull_and_draw_together(GraphicsEngine::Windows wlist,
                        Thread *current_thread) {
   PStatTimer timer(_cull_pcollector, current_thread);
 
@@ -1380,7 +1380,7 @@ cull_and_draw_together(GraphicsOutput *win, DisplayRegion *dr,
  * drawing.
  */
 void GraphicsEngine::
-cull_to_bins(const GraphicsEngine::Windows &wlist, Thread *current_thread) {
+cull_to_bins(GraphicsEngine::Windows wlist, Thread *current_thread) {
   PStatTimer timer(_cull_pcollector, current_thread);
 
   _singular_warning_last_frame = _singular_warning_this_frame;

+ 2 - 2
panda/src/display/graphicsEngine.h

@@ -142,11 +142,11 @@ private:
 
   void set_window_sort(GraphicsOutput *window, int sort);
 
-  void cull_and_draw_together(const Windows &wlist, Thread *current_thread);
+  void cull_and_draw_together(Windows wlist, Thread *current_thread);
   void cull_and_draw_together(GraphicsOutput *win, DisplayRegion *dr,
                               Thread *current_thread);
 
-  void cull_to_bins(const Windows &wlist, Thread *current_thread);
+  void cull_to_bins(Windows wlist, Thread *current_thread);
   void cull_to_bins(GraphicsOutput *win, GraphicsStateGuardian *gsg,
                     DisplayRegion *dr, SceneSetup *scene_setup,
                     CullResult *cull_result, Thread *current_thread);