From f56a4d0de032f90a85077fc1be591b83c2eee7d6 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 19 Aug 2003 20:05:47 +0000 Subject: [PATCH] added refcounting to create_childpsp. Xcom2 installer Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1191 --- src/dos/dos_classes.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dos/dos_classes.cpp b/src/dos/dos_classes.cpp index 31283fde..e61cdafa 100644 --- a/src/dos/dos_classes.cpp +++ b/src/dos/dos_classes.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 The DOSBox Team + * Copyright (C) 2002-2003 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,6 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* $Id: dos_classes.cpp,v 1.30 2003-08-19 20:05:47 qbix79 Exp $ */ + #include #include #include "dosbox.h" @@ -171,7 +173,8 @@ void DOS_PSP::CopyFileTable(DOS_PSP* srcpsp,bool createchildpsp) { //copy obeying not inherit flag.(but dont duplicate them) bool allowCopy = (handle==0) || ((handle>0) && (FindEntryByHandle(handle)==0xff)); if((handleflags & DOS_NOT_INHERIT) && allowCopy) - { + { + Files[handle]->AddRef(); SetFileHandle(i,handle); } else