Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce0a119b authored by Yograj Verma's avatar Yograj Verma Committed by Ricardo Cerqueira
Browse files

Media process is crashing with NullPointer exception

Sometime, while creating thumnails list of media files in
compose MMS->attach file,  filepath may be null due to
synchronization issue.
Adding NULL check to avoid NUllPointer exception.

Change-Id: Id6cf5612a959b3ae15b44bc60dbbcbe40c624f09
CRs-Fixed: 636494
parent 519e54e1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -717,6 +717,11 @@ public final class MediaStore {
                            return null;
                        }
                        filePath = c.getString(1);
                        // this DB query can return null under some synchronization issue,
                        // returning NULL bitmap in such cases.
                        if (filePath == null) {
                            return null;
                        }
                    }
                    if (isVideo) {
                        bitmap = ThumbnailUtils.createVideoThumbnail(filePath, kind);