fix for error in own recent commit, null check before assignment.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 8 Feb 2013 04:43:36 +0000 (04:43 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 8 Feb 2013 04:43:36 +0000 (04:43 +0000)
source/blender/render/intern/source/bake.c

index f304ca5..cb6f961 100644 (file)
@@ -1072,8 +1072,8 @@ int RE_bake_shade_all_selected(Render *re, int type, Object *actob, short *do_up
                                if (!ibuf)
                                        continue;
 
+                               userdata = (BakeImBufuserData *)ibuf->userdata;
                                if (userdata) {
-                                       userdata = (BakeImBufuserData *) ibuf->userdata;
                                        RE_bake_ibuf_filter(ibuf, userdata->mask_buffer, re->r.bake_filter);
 
                                        if (use_displacement_buffer) {