# HG changeset patch # User Paper <37962225+mrpapersonic@users.noreply.github.com> # Date 1650606947 14400 # Node ID 161ec4e87d0a35af9845054dccc8fd45a244eec3 # Parent b283e2d60debb6c044ba7143f12a8b689c9c2f35 Crash fix for Windows 2000 and XP Windows 2000 and XP would crash if you pressed "Cancel" on the Open or Save file dialogs. diff -r b283e2d60deb -r 161ec4e87d0a src/gui.c --- 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");