mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
FileDescription: Disallow construction with a null File
It's not valid for a FileDescription to not have a file, so let's disallow it by taking a File& (or FIFO&) in the constructor.
This commit is contained in:
@@ -39,7 +39,7 @@ KResultOr<NonnullRefPtr<FileDescription>> PTYMultiplexer::open(int options)
|
||||
#ifdef PTMX_DEBUG
|
||||
dbgprintf("PTYMultiplexer::open: Vending master %u\n", master->index());
|
||||
#endif
|
||||
return FileDescription::create(master.ptr());
|
||||
return FileDescription::create(move(master));
|
||||
}
|
||||
|
||||
void PTYMultiplexer::notify_master_destroyed(Badge<MasterPTY>, unsigned index)
|
||||
|
||||
Reference in New Issue
Block a user