Merging r44227 through r45619 from trunk into soc-2011-tomato
[blender.git] / source / blender / editors / space_clip / space_clip.c
index 228c716e3b60608dc3306598fe96a286bd515964..ddd8c1b694741fae55fc87d2dfd7850442ae14e5 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 = FALSE;
+       scn->draw_context= NULL;
 
        return (SpaceLink *)scn;
 }