Mercurial > msvpvf
changeset 38:161ec4e87d0a
Crash fix for Windows 2000 and XP
Windows 2000 and XP would crash if you pressed "Cancel" on the Open or Save file dialogs.
author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
---|---|
date | Fri, 22 Apr 2022 01:55:47 -0400 |
parents | b283e2d60deb |
children | b32218b54640 |
files | src/gui.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gui.c Sun Apr 17 03:07:54 2022 -0400 +++ b/src/gui.c Fri Apr 22 01:55:47 2022 -0400 @@ -103,7 +103,9 @@ ofn.lpstrFilter = "Project files\0*.veg;*.vf\0All files\0*.*\0"; ofn.nFilterIndex = 1; - GetOpenFileName(&ofn); + if (GetOpenFileNameA(&ofn) == 0) { + return " "; + } display_file(filename); @@ -130,7 +132,9 @@ ofn.lpstrFilter = "Movie Studio project files\0*.vf\0VEGAS Pro project files\0*.veg\0All files\0*.*\0"; ofn.nFilterIndex = (int)type+1; - GetSaveFileName(&ofn); + if (GetSaveFileNameA(&ofn) == 0) { + return; + } copy_file(input_file, output_file); FILE* output = fopen(output_file, "r+b");