diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableFile.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableFile.java index 4b777b387d..438ace44d5 100644 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableFile.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableFile.java @@ -158,7 +158,11 @@ public abstract class DrawableFile { } public DataSource getDataSource() throws TskCoreException, TskDataException { - return getSleuthkitCase().getDataSource(file.getDataSource().getId()); + if (file.getDataSource() instanceof DataSource) { + return (DataSource)file.getDataSource(); + } else { + throw new TskCoreException(String.format("Failed to get data source for drawable file (id = %s)", file.getId())); + } } private Pair, Collection> makeAttributeValuePair(DrawableAttribute attribute) {