engine close fix

This commit is contained in:
aap 2020-08-15 08:18:35 +02:00
parent 2568e77fac
commit a78a02394e
2 changed files with 6 additions and 4 deletions

View File

@ -596,10 +596,11 @@ matfxOpen(void *o, int32, int32)
static void*
matfxClose(void *o, int32, int32)
{
for(uint i = 0; i < nelem(matFXGlobals.pipelines); i++)
if(matFXGlobals.pipelines[i] == matFXGlobals.dummypipe)
matFXGlobals.pipelines[i] = nil;
matFXGlobals.dummypipe->destroy();
matFXGlobals.dummypipe = nil;
for(uint i = 0; i < nelem(matFXGlobals.pipelines); i++)
matFXGlobals.pipelines[i] = nil;
return o;
}

View File

@ -342,10 +342,11 @@ skinOpen(void *o, int32, int32)
static void*
skinClose(void *o, int32, int32)
{
for(uint i = 0; i < nelem(skinGlobals.pipelines); i++)
if(skinGlobals.pipelines[i] == skinGlobals.dummypipe)
matFXGlobals.pipelines[i] = nil;
skinGlobals.dummypipe->destroy();
skinGlobals.dummypipe = nil;
for(uint i = 0; i < nelem(skinGlobals.pipelines); i++)
skinGlobals.pipelines[i] = nil;
return o;
}