From c0b420a74a3ae2135cb660bc2f8b923418fb7b92 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 20 Feb 2009 19:56:03 +0000 Subject: [PATCH] Fix crash when no texture is assigned --- panda/src/glstuff/glGraphicsBuffer_src.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index 077d810444..d00c5bfd4b 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -189,7 +189,10 @@ rebuild_bitplanes() { // Bind the FBO Texture *tex = get_texture(0); - + if (tex == 0) { + return; + } + if (tex->get_texture_type() != Texture::TT_cube_map) { if (_fbo == 0) { glgsg->_glGenFramebuffers(1, &_fbo);