diff options
author | Ton Roosendaal <ton@blender.org> | 2006-06-16 17:58:45 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-06-16 17:58:45 +0400 |
commit | f29e5542144d50e9b807d6cf9ee26a67bc0747c9 (patch) | |
tree | f1adcfd181e62f8e953c2deb6c44b1332e33e447 /source | |
parent | 3356c4ba2ff9bff8e0e0e1bf02e40bdd6bdeac18 (diff) |
This prevents to assign the built-in Images "Render Result" or "Compositor"
as texture to UV Face. Crashes in render, because memory then is undefined.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/drawimage.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c index 10f0a5271cb..f927028bfe6 100644 --- a/source/blender/src/drawimage.c +++ b/source/blender/src/drawimage.c @@ -290,6 +290,7 @@ void what_image(SpaceImage *sima) } } +/* called to assign images to UV faces */ void image_changed(SpaceImage *sima, int dotile) { TFace *tface; @@ -299,8 +300,18 @@ void image_changed(SpaceImage *sima, int dotile) if(sima->mode==SI_TEXTURE) { if(G.f & G_FACESELECT) { + + /* exception images, name rules are actually weak... */ + if(sima->image) { + if(BLI_streq(sima->image->name, "Render Result")) + return; + if(BLI_streq(sima->image->name, "Composite")) + return; + } + me= get_mesh(OBACT); if(me && me->tface) { + tface= me->tface; a= me->totface; while(a--) { |