Browse Source

fix crash

David Rose 20 years ago
parent
commit
d1e65cd52d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      panda/src/gobj/texture.cxx

+ 4 - 0
panda/src/gobj/texture.cxx

@@ -838,6 +838,10 @@ get_ram_image() {
     reload_ram_image();
   }
 
+  if (_ram_images.empty()) {
+    return CPTA_uchar();
+  }
+
   return _ram_images[0]._image;
 }