Commit dae4f853 authored by Geoffrey Métais's avatar Geoffrey Métais

Catch OutOfMemory exception

Just in case...
parent c670e177
......@@ -131,7 +131,11 @@ public class BitmapUtil {
options.inJustDecodeBounds = false;
// Decode the file (with memory allocation this time)
cover = BitmapFactory.decodeFile(uri, options);
try {
cover = BitmapFactory.decodeFile(uri, options);
} catch (OutOfMemoryError e) {
cover = null;
}
}
return cover;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment