mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Added null check
This commit is contained in:
parent
e0dc2a96ad
commit
d0eb8b8d32
@ -156,7 +156,7 @@ class Ingester {
|
||||
try (BufferedReader reader = new BufferedReader(extractor.getReader(source));) {
|
||||
Chunker chunker = new Chunker(reader);
|
||||
for (Chunk chunk : chunker) {
|
||||
if (context.fileIngestIsCancelled()) {
|
||||
if (context != null && context.fileIngestIsCancelled()) {
|
||||
logger.log(Level.INFO, "File ingest cancelled. Cancelling keyword search indexing of {0}", sourceName);
|
||||
return false;
|
||||
}
|
||||
@ -182,7 +182,7 @@ class Ingester {
|
||||
extractor.logWarning("Unexpected error, can't read content stream from " + sourceID + ": " + sourceName, ex);//NON-NLS
|
||||
return false;
|
||||
} finally {
|
||||
if (context.fileIngestIsCancelled()) {
|
||||
if (context != null && context.fileIngestIsCancelled()) {
|
||||
return false;
|
||||
} else {
|
||||
//after all chunks, index just the meta data, including the numChunks, of the parent file
|
||||
|
Loading…
x
Reference in New Issue
Block a user