IFSSaver: Add some better error checking

This commit is contained in:
John Scipione
2014-05-15 17:40:51 -04:00
parent 3daf447497
commit ca7ee40437
@@ -153,9 +153,18 @@ IFSSaver::StartSaver(BView* view, bool preview)
SetTickSize((bigtime_t)floor(1000000.0 / fps + 0.5));
fIsPreview = preview;
if (view == NULL)
return B_BAD_VALUE;
fBounds = view->Bounds();
if (!fBounds.IsValid())
return B_BAD_VALUE;
_Init(fBounds);
if (fIFS == NULL)
return B_ERROR;
fIFS->SetAdditive(fIsPreview || fAdditive);
fIFS->SetSpeed(fSpeed);