summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-01-07 16:24:07 +0000
committerRobert Bragg <robert@linux.intel.com>2013-01-22 17:48:19 +0000
commit7572fedeaaf40cdf2feaa6468b66b19254aea7c2 (patch)
tree16bc9f877a2e723008cec008b9fc8ce7728972d7
parent82615e292d44a93670c4d5143f8fde69f562c59c (diff)
downloadcogl-7572fedeaaf40cdf2feaa6468b66b19254aea7c2.tar.gz
Fix filling the array of texture pointers for sliced textures
In commit 1fa7c0f10a8a0 the sliced texture code which creates the array of pointers to the texture slices was changed so that the textures are appended to the end of the array instead of initially creating the array with the right size upfront and then shrinking the array on error. However it was then still also setting the size of the array after creating it so the new textures would actually end up in an unused part of the array. The part of the array that is used was left unitialised so it would crash. This just removes the call to set the size of the array. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 7df09d505ba28a1a960df867346af67118e96718)
-rw-r--r--cogl/cogl-texture-2d-sliced.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/cogl/cogl-texture-2d-sliced.c b/cogl/cogl-texture-2d-sliced.c
index b7f16f94..17184bbf 100644
--- a/cogl/cogl-texture-2d-sliced.c
+++ b/cogl/cogl-texture-2d-sliced.c
@@ -939,8 +939,6 @@ _cogl_texture_2d_sliced_allocate (CoglTexture *tex,
sizeof (CoglTexture2D *),
n_slices);
- g_array_set_size (tex_2ds->slice_textures, n_slices);
-
/* Allocate each slice */
for (y = 0; y < n_y_slices; ++y)
{