Browse Source

Avoid crash in p3tinydisplay when there is no initial window

Ed Swartz 10 years ago
parent
commit
9396f998fb
1 changed files with 4 additions and 0 deletions
  1. 4 0
      panda/src/tinydisplay/tinyXGraphicsWindow.cxx

+ 4 - 0
panda/src/tinydisplay/tinyXGraphicsWindow.cxx

@@ -604,6 +604,10 @@ create_full_frame_buffer() {
 ////////////////////////////////////////////////////////////////////
 void TinyXGraphicsWindow::
 create_reduced_frame_buffer() {
+  if (!_full_frame_buffer) {
+     return;
+  }
+
   if (_reduced_frame_buffer != NULL) {
     ZB_close(_reduced_frame_buffer);
     _reduced_frame_buffer = NULL;