Try to fix crash.
authorCarl Hetherington <cth@carlh.net>
Sat, 13 Jun 2015 00:22:10 +0000 (01:22 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 13 Jun 2015 00:22:10 +0000 (01:22 +0100)
src/lib/ffmpeg_examiner.cc

index f68c896dba256ee074a60a6b4f4659053d1711ab..6d5e33238913c0f1e1afb79659e005ebb42f099b 100644 (file)
@@ -77,7 +77,9 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
                job->set_progress_unknown ();
        }
 
-       job->sub (_("Finding subtitles"));
+       if (job) {
+               job->sub (_("Finding subtitles"));
+       }
 
        /* Run through until we find:
         *   - the first video.
@@ -94,7 +96,9 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
                        break;
                }
 
-               job->set_progress_unknown ();
+               if (job) {
+                       job->set_progress_unknown ();
+               }
 
                AVCodecContext* context = _format_context->streams[_packet.stream_index]->codec;