Merging r43909 through r43951 from trunk into soc-2011-tomato
[blender.git] / source / blender / editors / space_clip / space_clip.c
index 97da05e3f764941ba0c9c6cd386672885467c502..41c52e6fa0b2129c2f6650720061e6f8289a2b70 100644 (file)
@@ -214,6 +214,8 @@ static void clip_free(SpaceLink *sl)
 
        if(sc->scopes.track_preview)
                IMB_freeImBuf(sc->scopes.track_preview);
+
+       ED_space_clip_free_texture_buffer(sc);
 }
 
 /* spacetype; init callback */
@@ -229,6 +231,7 @@ static SpaceLink *clip_duplicate(SpaceLink *sl)
        /* clear or remove stuff from old */
        scn->scopes.track_preview= NULL;
        scn->scopes.ok= 0;
+       scn->draw_context= NULL;
 
        return (SpaceLink *)scn;
 }