diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-27 23:17:32 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-27 23:17:32 +0300 |
commit | 2e610b3fb27991992ee29063a5a1c7b5eb7e9018 (patch) | |
tree | c5157871d8148b48119fedbcafbd8b3d9ca03522 /source | |
parent | 4977609832e897aeb864f8642c3ff0983422d6d6 (diff) |
Fix for bug #17961: crash with material copy/past and GLSL.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/header_buttonswin.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/src/header_buttonswin.c b/source/blender/src/header_buttonswin.c index 1e2890f4f2b..857fec16a64 100644 --- a/source/blender/src/header_buttonswin.c +++ b/source/blender/src/header_buttonswin.c @@ -77,6 +77,8 @@ #include "MEM_guardedalloc.h" #include "BLI_blenlib.h" +#include "GPU_material.h" + #include "blendef.h" #include "mydevice.h" #include "butspace.h" @@ -168,6 +170,7 @@ void do_buts_buttons(short event) } matcopybuf.nodetree= ntreeCopyTree(ma->nodetree, 0); matcopybuf.preview= NULL; + matcopybuf.gpumaterial.first= matcopybuf.gpumaterial.last= NULL; matcopied= 1; } break; @@ -188,6 +191,8 @@ void do_buts_buttons(short event) ntreeFreeTree(ma->nodetree); MEM_freeN(ma->nodetree); } + + GPU_materials_free(ma); id= (ma->id); memcpy(ma, &matcopybuf, sizeof(Material)); |