diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-09 21:48:41 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-09 21:48:41 +0100 |
| commit | d7a166924028262ab307bb622da1dc85f127f944 (patch) | |
| tree | cca9f835dc576216f66ebba4d46956ad39fd95c7 /src | |
| parent | b8b2fd0b0aeaa1ec95171eaf12c462ff8b555e0e (diff) | |
Fix NaN on creating a new film.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/film_editor.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index 5e597ac30..d0136cfba 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -1348,13 +1348,14 @@ FilmEditor::setup_scaling_description () int lines = 0; - d << wxString::Format ( - _("Original video is %dx%d (%.2f:1)\n"), - _film->size().width, _film->size().height, - float (_film->size().width) / _film->size().height - ); - - ++lines; + if (_film->size().width && _film->size().height) { + d << wxString::Format ( + _("Original video is %dx%d (%.2f:1)\n"), + _film->size().width, _film->size().height, + float (_film->size().width) / _film->size().height + ); + ++lines; + } Crop const crop = _film->crop (); if (crop.left || crop.right || crop.top || crop.bottom) { |
