From c2ab493524ebf3e429b00f68ecbd466ab4dc81cb Mon Sep 17 00:00:00 2001 From: "RichardAsh1981@gmail.com" Date: Sun, 19 May 2013 14:28:38 +0000 Subject: [PATCH] fix crash when using --without-ffmpeg when ffmpeg importer is still in prefs from previous --with-ffmpeg builds. Patch by Michael Chinen --- src/import/Import.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/import/Import.cpp b/src/import/Import.cpp index 5ca2e76f4..b02d36a16 100644 --- a/src/import/Import.cpp +++ b/src/import/Import.cpp @@ -423,6 +423,11 @@ int Importer::Import(wxString fName, wxLogDebug(wxT("Complete match!")); for (size_t j = 0; j < item->filter_objects.Count() && (item->divider < 0 || (int) j < item->divider); j++) { + // the filter_object can be NULL if a suitable importer was not found + // this happens when we recompile with --without-ffmpeg and there + // is still ffmpeg in prefs from previous --with-ffmpeg builds + if (!(item->filter_objects[j])) + continue; wxLogDebug(wxT("Inserting %s"),item->filter_objects[j]->GetPluginStringID().c_str()); importPlugins.Append(item->filter_objects[j]); }