material: don't dereference layer->texture directly
material: don't dereference layer->texture directly

In _cogl_material_texture_storage_change_notify we were potentially
dereferencing layer->texture without checking first that it is the
authority of texture state. We now use
_cogl_material_layer_get_texture() instead.

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