Fix unitialized first_pixels for foreign textures
authorOwen W. Taylor <otaylor@fishsoup.net>
Mon, 8 Jun 2009 20:45:43 +0000 (16:45 -0400)
committerNeil Roberts <neil@linux.intel.com>
Tue, 9 Jun 2009 09:54:54 +0000 (10:54 +0100)
commit1d7a7bf1e61a800e5ddeb738899f09a0009eabba
treeb486d6c22f47ebf7564a2a8792b7504280221eab
parent08d580f68a02b7cd9eb4b8a93d9f32aa63db3a38
Fix unitialized first_pixels for foreign textures

tex->first_pixels was never set for foreign textures, leading
to a crash when the texture object is freed.

As a quick fix, simply set to NULL. A more complete fix would
require remembering if we had ever seen the first pixel uploaded,
and if not, doing a glReadPixel to get it before triggering the
mipmap update.

http://bugzilla.openedhand.com/show_bug.cgi?id=1645

Signed-off-by: Neil Roberts <neil@linux.intel.com>
clutter/cogl/gl/cogl-texture.c
clutter/cogl/gles/cogl-texture.c