From 402f2159fa4cb76c602c0b9a9e3191b90c702c54 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 28 Feb 2013 17:23:44 +0000 Subject: Fix own regression in commit from today -- missing NULL check Crash happened when sequence image failed to load. --- source/blender/blenkernel/intern/movieclip.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/movieclip.c') diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index b748f8cbdd3..5519edca7ff 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -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 -- cgit v1.2.3