cogl-pipeline: Fix comparing the texture data state for NULL textures
cogl-pipeline: Fix comparing the texture data state for NULL textures

When comparing the texture data for a pipeline layer it tries to get
the GL texture handle out of the texture object. However it's valid
for a layer to have a NULL texture object but in that case the code
would just crash. This patch fixes it to compare the texture types
when the texture object is NULL.

Reviewed-by: Robert Bragg <12e9293ec6b30c7fa8a0926af42807e929c1684f@linux.intel.com>

djdeath/cogl,Distrotech/cogl,Distrotech/cogl,gcampax/cogl,djdeath/cogl-android,Distrotech/cogl,djdeath/cogl-android,gcampax/cogl,djdeath/cogl,gcampax/cogl,djdeath/cogl-android,djdeath/cogl,gcampax/cogl,Distrotech/cogl