serenity icon indicating copy to clipboard operation
serenity copied to clipboard

PixelPaint: Don't crash when cancel is pressed when saving a file

Open tcl3 opened this issue 1 year ago • 0 comments

Previously, we were attempting to add an empty string to the most recently open files list when no file was saved.

Application::set_most_recently_open_file() now asserts that the path you are trying to set isn't empty. Doing this doesn't make sense and trying to set an empty path causes a crash that isn't immediately obvious. Better to fail early in this case.

NB: #23131 stops the above-mentioned crash from happening.

Fixes #23130

tcl3 avatar Feb 09 '24 06:02 tcl3