aboutsummaryrefslogtreecommitdiff
path: root/games/warzone2100/files/patch-src_loadsave.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/warzone2100/files/patch-src_loadsave.c')
-rw-r--r--games/warzone2100/files/patch-src_loadsave.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/games/warzone2100/files/patch-src_loadsave.c b/games/warzone2100/files/patch-src_loadsave.c
new file mode 100644
index 000000000000..0c5689603604
--- /dev/null
+++ b/games/warzone2100/files/patch-src_loadsave.c
@@ -0,0 +1,22 @@
+--- src/loadsave.c.orig Wed Jul 27 13:33:56 2005
++++ src/loadsave.c Thu Sep 22 15:40:54 2005
+@@ -341,7 +341,8 @@
+ }
+ }
+ }
+- closedir(d);
++ if (d)
++ closedir(d);
+ }
+ #endif
+ bLoadSaveUp = TRUE;
+@@ -444,7 +445,8 @@
+ DeleteFile(entry->d_name);
+ }
+
+- closedir(d);
++ if (d)
++ closedir(d);
+ }
+ #endif
+