1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00

LibGUI: Assert that most recently open file path isn't empty

Attempting to do this causes a crash. It's better to fail early in this
case, so that the cause of the failure is clear.
This commit is contained in:
Tim Ledbetter 2024-02-09 05:55:02 +00:00 committed by Jelle Raaijmakers
parent ad62e433f0
commit 1a223d07e1

View file

@ -373,6 +373,7 @@ void Application::update_recent_file_actions()
void Application::set_most_recently_open_file(ByteString new_path)
{
VERIFY(!new_path.is_empty());
Vector<ByteString> new_recent_files_list;
for (size_t i = 0; i < max_recently_open_files(); ++i) {