- auto d = new CustomScaleDialog (this, vc->size(), _parent->film()->frame_size(), vc->custom_ratio(), vc->custom_size());
- int const r = d->ShowModal ();
- if (r == wxID_OK) {
- for (auto i: _parent->selected_video()) {
- i->video->set_custom_ratio (d->custom_ratio());
- i->video->set_custom_size (d->custom_size());
- }
+ auto size = vc->size();
+ DCPOMATIC_ASSERT(size);
+
+ CustomScaleDialog dialog(this, *size, _parent->film()->frame_size(), vc->custom_ratio(), vc->custom_size());
+ if (dialog.ShowModal() != wxID_OK) {
+ return false;