Fix crash when texture name is empty