Closed falkTX closed 2 years ago
Just so we are clear here: I will wait for you to rework the file utils to do the unique_ptr + free approach, potentially making it async too, then I will rebase this PR on top. Ping me once done, thanks!
Fixed with #30
Your file utils are using
std::unique_ptr
which uses C++ new/delete operations behind the scenes. The value returned byosdialog_file
is a C-stylemalloc
pointer, which needs the C-stylefree
call. Mismatch of new/delete with malloc/free can cause crashes. This PR fixes it, so that we use the correctfree
call.Additionally the file browser stuff is also patched to work in Cardinal, where I do not allow osdialog as it blocks the host event loop (IMO that is very bad practice).