From 1e79abafa04895801787b04bc22b52341d2aed2d Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 20 Feb 2022 16:25:23 -0700 Subject: [PATCH] qbsp: q2: fix empty optional access when compiling q2 map lacking extended flags --- qbsp/map.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qbsp/map.cc b/qbsp/map.cc index f6efe22f..2ac9e542 100644 --- a/qbsp/map.cc +++ b/qbsp/map.cc @@ -1371,6 +1371,9 @@ static void ParseTextureDef(parser_t &parser, mapface_t &mapface, const mapbrush // assign animation to extinfo, so that we load the animated // first one first if (auto wal = LoadWal(mapface.texname.c_str())) { + if (!extinfo.info) { + extinfo.info = extended_texinfo_t{}; + } extinfo.info->animation = wal->animation; } }