diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-09-02 22:32:06 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-09-02 22:32:06 +0200 |
| commit | 6d5f1a9dd0f3968d44638939aad038ccb20ac9e8 (patch) | |
| tree | dd69f13672eef9e5432e28773e08587f00f584e7 | |
| parent | 8cb7fc5369bdb76adc70cd81ccb073828054be16 (diff) | |
Fix crash when pressing Ctrl+{C,V} at the wrong time.
| -rw-r--r-- | src/tools/dcpomatic.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index b53f39b45..bd5cbaa7a 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -707,13 +707,16 @@ private: void edit_copy () { auto const sel = _film_editor->content_panel()->selected(); - DCPOMATIC_ASSERT (sel.size() == 1); - _clipboard = sel.front()->clone(); + if (sel.size() == 1) { + _clipboard = sel.front()->clone(); + } } void edit_paste () { - DCPOMATIC_ASSERT (_clipboard); + if (!_clipboard) { + return; + } PasteDialog dialog(this, static_cast<bool>(_clipboard->video), static_cast<bool>(_clipboard->audio), !_clipboard->text.empty()); if (dialog.ShowModal() != wxID_OK) { |
