Skip to content
Snippets Groups Projects
Commit 65cac21c authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Prevent NullPointerException by avoiding race conditions

parent 31ac8d0a
No related branches found
No related tags found
1 merge request!1110Crash fixes
Pipeline #144785 passed with stage
in 28 minutes and 51 seconds
......@@ -535,10 +535,12 @@ public abstract class MediaWrapper extends MediaLibraryItem implements Parcelabl
@Override
public String getTitle() {
if (!TextUtils.isEmpty(mDisplayTitle))
return mDisplayTitle;
if (!TextUtils.isEmpty(mTitle))
return mTitle;
String displayTitle = mDisplayTitle;
if (!TextUtils.isEmpty(displayTitle))
return displayTitle;
String title = mTitle;
if (!TextUtils.isEmpty(title))
return title;
String fileName = getFileName();
if (fileName == null)
return "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment