Debug: Fix crash when dumping null sprite group

pull/397/head^2
Jonathan G Rennison 2 years ago
parent c1df524c4b
commit 65236bacc7

@ -773,8 +773,6 @@ bool SpriteGroupDumper::use_shadows = false;
void SpriteGroupDumper::DumpSpriteGroup(const SpriteGroup *sg, int padding, uint flags)
{
if (sg->nfo_line != 0) this->print_fn(sg, DSGPO_NFO_LINE, sg->nfo_line, nullptr);
uint32 highlight_tag = 0;
auto print = [&]() {
this->print_fn(sg, DSGPO_PRINT, highlight_tag, this->buffer);
@ -787,6 +785,8 @@ void SpriteGroupDumper::DumpSpriteGroup(const SpriteGroup *sg, int padding, uint
return;
}
if (sg->nfo_line != 0) this->print_fn(sg, DSGPO_NFO_LINE, sg->nfo_line, nullptr);
bool start_emitted = false;
auto emit_start = [&]() {
this->print_fn(sg, DSGPO_START, 0, nullptr);

Loading…
Cancel
Save