summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wx/film_editor.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc
index 98d30a2a3..d0534f9c0 100644
--- a/src/wx/film_editor.cc
+++ b/src/wx/film_editor.cc
@@ -879,7 +879,10 @@ ContentList
FilmEditor::selected_content ()
{
ContentList sel;
- long int s = -1;
+
+ if (!_film) {
+ return sel;
+ }
/* The list was populated using a sorted content list, so we must sort it here too
so that we can look up by index and get the right thing.
@@ -887,6 +890,7 @@ FilmEditor::selected_content ()
ContentList content = _film->content ();
sort (content.begin(), content.end(), ContentSorter ());
+ long int s = -1;
while (true) {
s = _content->GetNextItem (s, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (s == -1) {