From 8623edf53669daaa998c42113a6a64d984fa0bee Mon Sep 17 00:00:00 2001 From: SadPencil Date: Mon, 9 Dec 2024 17:47:49 +0800 Subject: [PATCH] Fix options cannot be saved when a renderer is not selected --- DTAConfig/DirectDrawWrapper.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/DTAConfig/DirectDrawWrapper.cs b/DTAConfig/DirectDrawWrapper.cs index bea02677f..e0cb56656 100644 --- a/DTAConfig/DirectDrawWrapper.cs +++ b/DTAConfig/DirectDrawWrapper.cs @@ -174,8 +174,11 @@ public void Apply() } else { - new FileInfo(ddrawDllTargetPath).IsReadOnly = false; - File.Delete(ddrawDllTargetPath); + if (File.Exists(ddrawDllTargetPath)) + { + new FileInfo(ddrawDllTargetPath).IsReadOnly = false; + File.Delete(ddrawDllTargetPath); + } }