Browse Source

reverse order for robustness

David Rose 17 years ago
parent
commit
45c2aafe47
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

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

@@ -3613,8 +3613,8 @@ framebuffer_copy_to_ram(Texture *tex, int z, const DisplayRegion *dr,
       << ")" << endl;
   }
 
-  size_t image_size = tex->get_ram_image_size();
   unsigned char *image_ptr = tex->modify_ram_image();
+  size_t image_size = tex->get_ram_image_size();
   if (z >= 0) {
     nassertr(z < tex->get_z_size(), false);
     image_size = tex->get_expected_ram_page_size();