Fix 6317967: Missing exception for SetPipRatio(). (#11465)

This commit is contained in:
Peter Nelson 2023-11-16 19:22:02 +00:00 committed by GitHub
parent 60651227a0
commit f93711838f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -3254,6 +3254,8 @@ static const NWidgetPart *MakeNWidget(const NWidgetPart *nwid_begin, const NWidg
NWidgetBackground *nwb = dynamic_cast<NWidgetBackground *>(*dest);
if (nwb != nullptr) nwb->SetPIPRatio(nwid_begin->u.pip.pre, nwid_begin->u.pip.inter, nwid_begin->u.pip.post);
if (unlikely(nwc == nullptr && nwb == nullptr)) throw std::runtime_error("WPT_PIPRATIO requires NWidgetPIPContainer or NWidgetBackground");
break;
}