reverse order for robustness

This commit is contained in:
David Rose 2008-05-05 23:31:39 +00:00
parent 6c2eee140d
commit 45c2aafe47

View File

@ -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();