The handle gets nulled out if the user has closed the file; don't pass that
null to fclose() in a garbage collection destructor too...
This commit is contained in:
parent
7d631e4959
commit
33e01e431d
@ -79,6 +79,7 @@ static void ghostDestroy(void* g)
|
||||
|
||||
static void ioclose(naContext c, void* f)
|
||||
{
|
||||
if(f)
|
||||
if(fclose(f) != 0 && c) naRuntimeError(c, strerror(errno));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user