Fix own regression in commit from today -- missing NULL check

Crash happened when sequence image failed to load.
This commit is contained in:
Sergey Sharybin 2013-02-28 17:23:44 +00:00
parent 28444a4831
commit 402f2159fa

View file

@ -227,9 +227,11 @@ static ImBuf *movieclip_load_sequence_file(MovieClip *clip, MovieClipUser *user,
ibuf = IMB_loadiffname(name, loadflag, colorspace);
#ifdef WITH_OPENEXR
if (ibuf->ftype == OPENEXR && ibuf->userdata) {
IMB_exr_close(ibuf->userdata);
ibuf->userdata = NULL;
if (ibuf) {
if (ibuf->ftype == OPENEXR && ibuf->userdata) {
IMB_exr_close(ibuf->userdata);
ibuf->userdata = NULL;
}
}
#endif