From 45c2aafe47c96d1eb7e8b2c57fb2aa1ccb0d2575 Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 5 May 2008 23:31:39 +0000 Subject: [PATCH] reverse order for robustness --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 45001d293f..65e1d865a3 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/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();