From b856e69223bab3ccf94ba5c4baf5ad587f8b9427 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 26 Oct 2009 01:42:15 +0100 Subject: [PATCH] Fixed directory memory leak. --- src/zr/models.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zr/models.inc b/src/zr/models.inc index 359f3eb..e735f12 100644 --- a/src/zr/models.inc +++ b/src/zr/models.inc @@ -148,6 +148,8 @@ ModelsLoad() modelfilecount++; } + CloseHandle(modeldir); + // Increment variable if model files are valid. if (modelfilecount) { @@ -318,4 +320,4 @@ stock ModelsGetRandomModelIndex(String:modelpath[], maxlen, bool:all = true, boo // Get the path to the selected model. ModelReturnPath(modelindex, modelpath, maxlen); -} \ No newline at end of file +}