2.5: fix a crash switching to space types with old space data.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 23 Dec 2008 01:08:02 +0000 (01:08 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 23 Dec 2008 01:08:02 +0000 (01:08 +0000)
source/blender/editors/screen/area.c

index 1c47d9302a1e93a9e1819cc49542c939cb5df80b..41212de118a0266fd1833706cfeae5a99005f9af 100644 (file)
@@ -602,7 +602,7 @@ void area_newspace(bContext *C, ScrArea *sa, int type)
                /* old spacedata... happened during work on 2.50, remove */
                if(sl && sl->regionbase.first==NULL) {
                        st->free(sl);
-                       MEM_freeN(sl);
+                       BLI_freelinkN(&sa->spacedata, sl);
                        sl= NULL;
                }