summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-03-04 19:51:26 +0000
committerCarl Hetherington <cth@carlh.net>2013-03-04 19:51:26 +0000
commit306758719391fab2423f1ec5ea8f8a3470b6a8b6 (patch)
tree33edebfc7ddd46b76444cebd7ef78c06e53f1940 /src
parent0b6652b491ffe7544a6f4a14fe968615d4481594 (diff)
Fix crash and tidy up hints when there is no content.
Diffstat (limited to 'src')
-rw-r--r--src/wx/film_editor.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc
index a19d2fff1..8330e3d3e 100644
--- a/src/wx/film_editor.cc
+++ b/src/wx/film_editor.cc
@@ -643,7 +643,11 @@ FilmEditor::film_changed (Film::Property p)
}
setup_dcp_name ();
- _format_description->SetLabel (std_to_wx (_film->format()->description ()));
+ if (_film->format ()) {
+ _format_description->SetLabel (std_to_wx (_film->format()->description ()));
+ } else {
+ _format_description->SetLabel (wxT (""));
+ }
break;
}
case Film::CROP:
@@ -781,8 +785,14 @@ FilmEditor::film_changed (Film::Property p)
}
}
}
- _frame_rate_description->SetLabel (std_to_wx (FrameRateConversion (_film->source_frame_rate(), _film->dcp_frame_rate()).description));
- _best_dcp_frame_rate->Enable (best_dcp_frame_rate (_film->source_frame_rate ()) != _film->dcp_frame_rate ());
+
+ if (_film->source_frame_rate()) {
+ _frame_rate_description->SetLabel (std_to_wx (FrameRateConversion (_film->source_frame_rate(), _film->dcp_frame_rate()).description));
+ _best_dcp_frame_rate->Enable (best_dcp_frame_rate (_film->source_frame_rate ()) != _film->dcp_frame_rate ());
+ } else {
+ _frame_rate_description->SetLabel (wxT (""));
+ _best_dcp_frame_rate->Disable ();
+ }
}
}