fix NPE in DraggableRow

line1 might be null for whatever reason (playlist with deleted songs during scan) - use placeholder text
for line1 if it is not a string object.
This commit is contained in:
Adrian Ulrich committed 2018-07-06 21:05:08 +02:00
1 parent f48ed019c7
commit 474402c119
1 file changed
+3
@@ -189,6 +189,9 @@ public class DraggableRow extends LinearLayout implements Checkable {
* @param line2 the second line to show
*/
public void setText(CharSequence line1, CharSequence line2) {
if (line1 == null)
line1 = "???";
SpannableStringBuilder sb = new SpannableStringBuilder(line1);
sb.append("\n");
sb.append(line2);