From 4a945f8d6c9ee451cc1a3e9e2db8e54df8545f48 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Wed, 4 Sep 2013 13:32:11 +0200 Subject: [PATCH] Null PhysFS handle after closing --- src/filesystem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/filesystem.cpp b/src/filesystem.cpp index b72800d..0b34b2f 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -706,6 +706,8 @@ static int SDL_RWopsClose(SDL_RWops *ops) int result = PHYSFS_close(f); + f = 0; + return (result != 0) ? 0 : -1; }