diff options
author | Grigori Goronzy <goronzy@64pc31.informatik.uni-luebeck.de> | 2009-07-02 16:43:24 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2009-07-07 01:39:44 +0200 |
commit | 5a2b270b218a429763f0a032386705f55bca0a92 (patch) | |
tree | 967ea12214607a5f1d10ff55f1b19aa6f942f3d1 | |
parent | bffeb000dc2b561733fb92fdf868e472a07ea258 (diff) | |
download | libass-5a2b270b218a429763f0a032386705f55bca0a92.tar.bz2 libass-5a2b270b218a429763f0a032386705f55bca0a92.tar.xz |
Test program: check track initialization
Stop in case the track initialization fails. This fixes a crash.
-rw-r--r-- | test/test.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test.cpp b/test/test.cpp index 4b39110..816d779 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -147,6 +147,10 @@ int main(int argc, char* argv[]) { init(frame_w, frame_h); ass_track_t* track = ass_read_file(ass_library, subfile, NULL); + if (!track) { + printf("track init failed!\n"); + return 1; + } ass_image_t* img = ass_render_frame(ass_renderer, track, (int)(tm * 1000), NULL); image_t* frame = gen_image(frame_w, frame_h); |