fix for crash in python getting the image size for a sequence.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 28 Jun 2012 15:34:21 +0000 (15:34 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 28 Jun 2012 15:34:21 +0000 (15:34 +0000)
source/blender/blenkernel/intern/image.c

index ea396b6d88ca2c543f028001b8370a5f0aeefc7b..d1fa7ecefeb02881dd897215be522bd0705b725c 100644 (file)
@@ -2851,7 +2851,7 @@ void BKE_image_user_file_path(ImageUser *iuser, Image *ima, char *filepath)
        if (ima->source == IMA_SRC_SEQUENCE) {
                char head[FILE_MAX], tail[FILE_MAX];
                unsigned short numlen;
-               int frame = iuser->framenr;
+               int frame = iuser ? iuser->framenr : ima->lastframe;
 
                BLI_stringdec(filepath, head, tail, &numlen);
                BLI_stringenc(filepath, head, tail, numlen, frame);