mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Fix for NPE with audio attachments.
This commit is contained in:
parent
82df23dd41
commit
dec7fd4c8a
@ -67,11 +67,12 @@ public class AudioSlide extends Slide {
|
||||
cursor = context.getContentResolver().query(uri, new String[]{Audio.Media.MIME_TYPE}, null, null, null);
|
||||
|
||||
if (cursor != null && cursor.moveToFirst())
|
||||
part.setContentType(cursor.getString(0).getBytes());
|
||||
part.setContentType(cursor.getString(0).getBytes());
|
||||
else
|
||||
throw new IOException("Unable to query content type.");
|
||||
throw new IOException("Unable to query content type.");
|
||||
} finally {
|
||||
cursor.close();
|
||||
if (cursor != null)
|
||||
cursor.close();
|
||||
}
|
||||
|
||||
part.setDataUri(uri);
|
||||
|
Loading…
x
Reference in New Issue
Block a user