mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-06 02:24:30 +00:00
Added null check to ExtractUNallocAction.getUnallocFiles()
This commit is contained in:
@@ -164,7 +164,10 @@ public final class ExtractUnallocAction extends AbstractAction {
|
||||
private List<LayoutFile> getUnallocFiles(Content c) {
|
||||
UnallocVisitor uv = new UnallocVisitor();
|
||||
try {
|
||||
return c.getChildren().get(0).accept(uv); //Launching it on the root directory
|
||||
List<Content> unallocFiles = c.getChildren();
|
||||
if (unallocFiles.isEmpty() == false) {
|
||||
return unallocFiles.get(0).accept(uv); //Launching it on the root directory
|
||||
}
|
||||
} catch (TskCoreException tce) {
|
||||
logger.log(Level.WARNING, "Couldn't get a list of Unallocated Files, failed at sending out the visitor ", tce);
|
||||
}
|
||||
|
||||
@@ -23,9 +23,6 @@ import java.util.List;
|
||||
import javax.swing.JPanel;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestDialogPanel;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleAbstract;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
|
||||
@ServiceProvider(service = IngestConfigurator.class)
|
||||
|
||||
Reference in New Issue
Block a user