Skip to content

Commit

Permalink
Fix logic error in freeCaptureBuffer()
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkRivers committed Dec 4, 2023
1 parent d1772ed commit 89a5a2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ADApp/pluginSrc/NDPluginFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ void NDPluginFile::freeCaptureBuffer()
{
NDArray *pArray;

setIntegerParam(NDFileNumCaptured, 0);
if (pCapture.size() == 0) return;
/* Free the capture buffer */
for (size_t i=0; i<pCapture.size(); i++) {
Expand All @@ -396,7 +397,6 @@ void NDPluginFile::freeCaptureBuffer()
pArray->release();
}
pCapture.clear();
setIntegerParam(NDFileNumCaptured, 0);
}

/** Handles the logic for when NDFileCapture changes state, starting or stopping capturing or streaming NDArrays
Expand Down

0 comments on commit 89a5a2a

Please sign in to comment.