fixed for null loaded textures for cpp