mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 10:19:03 +03:00
FileManager: Don't crash if pressing Return with no selected item.
This commit is contained in:
parent
c4937f01d8
commit
35c6dceee0
Notes:
sideshowbarker
2024-07-19 15:07:14 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/35c6dceee0d
@ -204,6 +204,8 @@ void DirectoryTableModel::open(const String& a_path)
|
||||
|
||||
void DirectoryTableModel::activate(const GModelIndex& index)
|
||||
{
|
||||
if (!index.is_valid())
|
||||
return;
|
||||
auto& entry = this->entry(index.row());
|
||||
FileSystemPath path(String::format("%s/%s", m_path.characters(), entry.name.characters()));
|
||||
if (entry.is_directory()) {
|
||||
|
Loading…
Reference in New Issue
Block a user