Merge pull request #12374 from iwubcode/custom_texture_potential_crash_fix VideoCommon: prevent a potential custom texture crash