Changeset - r28148:ca54e9a43260
[Not reviewed]
master
0 1 0
Peter Nelson - 13 months ago 2023-11-16 19:22:02
peter1138@openttd.org
Fix 6317967: Missing exception for SetPipRatio(). (#11465)
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/widget.cpp
Show inline comments
 
@@ -3254,6 +3254,8 @@ static const NWidgetPart *MakeNWidget(co
 

	
 
				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;
 
			}
 

	
0 comments (0 inline, 0 general)