Fix crash when setting a NULL texture on vsDynamicMaterial.