1
0
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:
Richard Cordovano
2013-09-17 10:37:25 -04:00
parent c2c3f0aa1a
commit 616269bdc2
2 changed files with 4 additions and 4 deletions

View File

@@ -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);
}

View File

@@ -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)