diff --git a/android/src/main/java/com/createthumbnail/CreateThumbnailModule.java b/android/src/main/java/com/createthumbnail/CreateThumbnailModule.java index 9bd67d8..aca2dde 100644 --- a/android/src/main/java/com/createthumbnail/CreateThumbnailModule.java +++ b/android/src/main/java/com/createthumbnail/CreateThumbnailModule.java @@ -189,7 +189,12 @@ private static Bitmap getBitmapAtTime(Context context, String filePath, int time } Bitmap image = retriever.getFrameAtTime(time * 1000, MediaMetadataRetriever.OPTION_CLOSEST_SYNC); - retriever.release(); + try { + retriever.release(); + } catch (Exception e) { // Catching Exception class as it's unclear what specific exception you're facing + // Handle or log the exception here + e.printStackTrace(); + } if (image == null) { throw new IllegalStateException("File doesn't exist or not supported"); }