From 191d20eb56f31786660cd04aacc710344eb8df7a Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 5 Feb 2010 17:03:04 +0000 Subject: [PATCH] cogl-atlas-texture: Fix a cut and paste error when getting the height There was a typo in getting the height of the full texture to check whether the sub region fits so that it was using the width instead. This was causing crashes when debugging is enabled for some apps. --- clutter/cogl/cogl/cogl-sub-texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/cogl/cogl/cogl-sub-texture.c b/clutter/cogl/cogl/cogl-sub-texture.c index 164a23f47..53b4d58cc 100644 --- a/clutter/cogl/cogl/cogl-sub-texture.c +++ b/clutter/cogl/cogl/cogl-sub-texture.c @@ -250,7 +250,7 @@ _cogl_sub_texture_new (CoglHandle full_texture, guint full_width, full_height; full_width = cogl_texture_get_width (full_texture); - full_height = cogl_texture_get_width (full_texture); + full_height = cogl_texture_get_height (full_texture); /* The region must specify a non-zero subset of the full texture */ g_return_val_if_fail (sub_x >= 0 && sub_y >= 0, COGL_INVALID_HANDLE);