From 5fbfbd4470876465897486c2ae3f0f8ee3375eb1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 13 Apr 2011 14:40:50 +0000 Subject: fix [#26904] Crush while open file ! commit r28002 was attempting to run do-versions on an invalid pointer. --- source/blender/blenloader/intern/readfile.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'source') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 1f4c8a51f4b..7ad157f89e8 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5354,10 +5354,12 @@ static void direct_link_screen(FileData *fd, bScreen *sc) /* WARNING: gpencil data is no longer stored directly in sima after 2.5 * so sacrifice a few old files for now to avoid crashes with new files! - */ - //sima->gpd= newdataadr(fd, sima->gpd); - //if (sima->gpd) - // direct_link_gpencil(fd, sima->gpd); + * committed: r28002 */ +#if 0 + sima->gpd= newdataadr(fd, sima->gpd); + if (sima->gpd) + direct_link_gpencil(fd, sima->gpd); +#endif } else if(sl->spacetype==SPACE_NODE) { SpaceNode *snode= (SpaceNode *)sl; @@ -6649,10 +6651,14 @@ static void do_versions_gpencil_2_50(Main *main, bScreen *screen) } else if (sl->spacetype==SPACE_IMAGE) { SpaceImage *sima= (SpaceImage *)sl; +#if 0 /* see comment on r28002 */ if(sima->gpd) { versions_gpencil_add_main(&main->gpencil, (ID *)sima->gpd, "GPencil Image"); sima->gpd= NULL; } +#else + sima->gpd= NULL; +#endif } } } -- cgit v1.2.3