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));) {
|
try (BufferedReader reader = new BufferedReader(extractor.getReader(source));) {
|
||||||
Chunker chunker = new Chunker(reader);
|
Chunker chunker = new Chunker(reader);
|
||||||
for (Chunk chunk : chunker) {
|
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);
|
logger.log(Level.INFO, "File ingest cancelled. Cancelling keyword search indexing of {0}", sourceName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ class Ingester {
|
|||||||
extractor.logWarning("Unexpected error, can't read content stream from " + sourceID + ": " + sourceName, ex);//NON-NLS
|
extractor.logWarning("Unexpected error, can't read content stream from " + sourceID + ": " + sourceName, ex);//NON-NLS
|
||||||
return false;
|
return false;
|
||||||
} finally {
|
} finally {
|
||||||
if (context.fileIngestIsCancelled()) {
|
if (context != null && context.fileIngestIsCancelled()) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
//after all chunks, index just the meta data, including the numChunks, of the parent file
|
//after all chunks, index just the meta data, including the numChunks, of the parent file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user