1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00

Kernel: Use try_make_weak_ptr() instead of make_weak_ptr()

This commit is contained in:
Idan Horowitz 2022-02-13 21:21:14 +02:00 committed by Andreas Kling
parent 98c20b65cc
commit c8ab7bde3b
7 changed files with 19 additions and 18 deletions

View file

@ -128,7 +128,7 @@ protected:
// If called from an IRQ handler we need to delay evaluation
// and unblocking of waiting threads. Note that this File
// instance may be deleted until the deferred call is executed!
Processor::deferred_call_queue([self = make_weak_ptr()]() {
Processor::deferred_call_queue([self = try_make_weak_ptr().release_value_but_fixme_should_propagate_errors()]() {
if (auto file = self.strong_ref())
file->do_evaluate_block_conditions();
});