Explorar el Código

Work around crash

rdb hace 16 años
padre
commit
2a9bdfdcd2
Se han modificado 1 ficheros con 8 adiciones y 3 borrados
  1. 8 3
      panda/src/display/graphicsOutput.cxx

+ 8 - 3
panda/src/display/graphicsOutput.cxx

@@ -329,10 +329,15 @@ add_render_texture(Texture *tex, RenderTextureMode mode,
   tex->set_size_padded(get_x_size(), get_y_size());
   
   if (mode == RTM_bind_or_copy) {
-    if (!_gsg->get_supports_render_texture() || !support_render_texture) {
-      // Binding is not supported or it is disabled, so just fall back
-      // to copy instead.
+    // Binding is not supported or it is disabled, so just fall back
+    // to copy instead.
+    if (!support_render_texture) {
       mode = RTM_copy_texture;
+    } else {
+      nassertv(_gsg != NULL);
+      if (!_gsg->get_supports_render_texture()) {
+        mode = RTM_copy_texture;
+      }
     }
   }