Check the params in SetTo().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30988 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b7cf537e50
commit
60a2c42f76
@ -80,6 +80,9 @@ BMediaFile::SetTo(const entry_ref* ref)
|
||||
{
|
||||
CALLED();
|
||||
|
||||
if (ref == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
_UnInit();
|
||||
fDeleteSource = true;
|
||||
_InitReader(new (std::nothrow) BFile(ref, O_RDONLY));
|
||||
@ -93,6 +96,9 @@ BMediaFile::SetTo(BDataIO* destination)
|
||||
{
|
||||
CALLED();
|
||||
|
||||
if (destination == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
_UnInit();
|
||||
_InitReader(destination);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user