mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 09:07:41 +00:00
FileManager: Don't crash if pressing Return with no selected item.
This commit is contained in:
parent
c4937f01d8
commit
35c6dceee0
1 changed files with 2 additions and 0 deletions
|
@ -204,6 +204,8 @@ void DirectoryTableModel::open(const String& a_path)
|
||||||
|
|
||||||
void DirectoryTableModel::activate(const GModelIndex& index)
|
void DirectoryTableModel::activate(const GModelIndex& index)
|
||||||
{
|
{
|
||||||
|
if (!index.is_valid())
|
||||||
|
return;
|
||||||
auto& entry = this->entry(index.row());
|
auto& entry = this->entry(index.row());
|
||||||
FileSystemPath path(String::format("%s/%s", m_path.characters(), entry.name.characters()));
|
FileSystemPath path(String::format("%s/%s", m_path.characters(), entry.name.characters()));
|
||||||
if (entry.is_directory()) {
|
if (entry.is_directory()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue