mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
FileManager: Don't crash on error in FileOperation
did_error() caused the program to crash since the DialogBox tried to run its own Notifier with the same - now invalid because closed - fd. In addition to setting the member that is the Notifier to nullptr we also tell the Notifier that it is not enabled anymore.
This commit is contained in:
parent
28b8a2ec7a
commit
7d60164d93
Notes:
sideshowbarker
2024-07-18 19:21:39 +09:00
Author: https://github.com/TobyAsE
Commit: 7d60164d93
Pull-request: https://github.com/SerenityOS/serenity/pull/6318
Issue: https://github.com/SerenityOS/serenity/issues/6310
Reviewed-by: https://github.com/awesomekling
1 changed files with 3 additions and 1 deletions
|
@ -167,8 +167,10 @@ void FileOperationProgressWidget::close_pipe()
|
|||
if (!m_helper_pipe)
|
||||
return;
|
||||
m_helper_pipe = nullptr;
|
||||
if (m_notifier)
|
||||
if (m_notifier) {
|
||||
m_notifier->set_enabled(false);
|
||||
m_notifier->on_ready_to_read = nullptr;
|
||||
}
|
||||
m_notifier = nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue