diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 2b51aaff8d..9f94f5b601 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/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();