The error:
If the material is of type "Volume", then when creating a new texture, the type of texture coordinates is blank. Adding a texture to any empty slot of a volume material does not automatically set Coordinates in Texture Mapping panel to Generated.
Resolving the problem:
Blender, by default, sets the texture’s “Coordinates” attribute to “UV”. However, the “Volume” type material doesn’t support the “UV” option so if this texture is assigned to this material, “Coordinates” would always be blank. To resolve this problem we change the texture.c file (in the directory blender/source/blender/blendkernel/intern/texture.c).
Thus, in the function void set_current_material_texture(Material *ma, Tex *newtex) if we are in a case of an active node with material ma, if that material is of type “Volume” (type MA_TYPE_VOLUME) we change the texture coordinates of the material (ma->mtex[act]->texco) to “Generated” (TEXCO_ORCO).