Skip to content

Commit ce1514a

Browse files
committed
Check whether callback is null
1 parent c71498a commit ce1514a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/document_scanner.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,10 @@ void scan(DynamsoftDocumentScanner *self, unsigned char *buffer, int width, int
257257
}
258258

259259
free(buffer);
260-
onResultReady(self, pResults);
260+
if (self->callback != NULL)
261+
{
262+
onResultReady(self, pResults);
263+
}
261264

262265
// Release memory
263266
if (pResults != NULL)

0 commit comments

Comments
 (0)