From 0c9d1ff1ed79aae46c16671d853aeb0fc215152c Mon Sep 17 00:00:00 2001 From: Chris Jefferson Date: Wed, 22 Feb 2017 20:27:47 +0000 Subject: [PATCH] Clear OutputtedFilenameList when workspace is restored --- src/profile.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/profile.c b/src/profile.c index 637bd6a21c..858e8ece9d 100644 --- a/src/profile.c +++ b/src/profile.c @@ -1005,6 +1005,16 @@ static Int InitKernel ( return 0; } +static Int PostRestore ( StructInitInfo * module ) +{ + /* When we restore a workspace, we start a new profile. + * 'OutputtedFilenameList' is the only part of the profile which is + * stored in the GAP memory space, so we need to clear it in case + * it still has a value from a previous profile. + */ + OutputtedFilenameList = NEW_PLIST(T_PLIST, 0); + return 0; +} /**************************************************************************** ** @@ -1022,7 +1032,7 @@ static StructInitInfo module = { 0, /* checkInit */ 0, /* preSave */ 0, /* postSave */ - 0 /* postRestore */ + PostRestore /* postRestore */ }; StructInitInfo * InitInfoProfile ( void )