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:
@@ -80,6 +80,9 @@ BMediaFile::SetTo(const entry_ref* ref)
|
|||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
|
if (ref == NULL)
|
||||||
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
_UnInit();
|
_UnInit();
|
||||||
fDeleteSource = true;
|
fDeleteSource = true;
|
||||||
_InitReader(new (std::nothrow) BFile(ref, O_RDONLY));
|
_InitReader(new (std::nothrow) BFile(ref, O_RDONLY));
|
||||||
@@ -93,6 +96,9 @@ BMediaFile::SetTo(BDataIO* destination)
|
|||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
|
if (destination == NULL)
|
||||||
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
_UnInit();
|
_UnInit();
|
||||||
_InitReader(destination);
|
_InitReader(destination);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user