瀏覽代碼

hack fix around crash

David Rose 17 年之前
父節點
當前提交
ab530f5d80
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

+ 4 - 1
panda/src/glstuff/glGraphicsStateGuardian_src.cxx

@@ -7524,7 +7524,10 @@ upload_texture(CLP(TextureContext) *gtc, bool force) {
       }
     }
 
-    get_engine()->texture_uploaded(tex);
+    GraphicsEngine *engine = get_engine();
+    nassertr(engine != (GraphicsEngine *)NULL, false);
+    engine = GraphicsEngine::get_global_ptr();  // temp hack
+    engine->texture_uploaded(tex);
     gtc->mark_loaded();
 
     report_my_gl_errors();