fix crash if texture not loaded