mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 12:44:58 +00:00
LibCore: Make CFile::open() assert that the filename is non-null
This commit is contained in:
parent
835496375f
commit
74bba649c3
1 changed files with 1 additions and 0 deletions
|
@ -26,6 +26,7 @@ bool CFile::open(int fd, CIODevice::OpenMode mode, ShouldCloseFileDescription sh
|
|||
|
||||
bool CFile::open(CIODevice::OpenMode mode)
|
||||
{
|
||||
ASSERT(!m_filename.is_null());
|
||||
int flags = 0;
|
||||
if ((mode & CIODevice::ReadWrite) == CIODevice::ReadWrite) {
|
||||
flags |= O_RDWR | O_CREAT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue