serenity
serenity copied to clipboard
PixelPaint: Don't crash when cancel is pressed when saving a file
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