prevent null ref on setting cover

This commit is contained in:
Til Schmitter 2026-05-12 22:21:02 +02:00
parent e59ec2f4aa
commit 442ce75622

View file

@ -2089,7 +2089,7 @@ var mpl = (function () {
r.set_mu_cv = function() {
var o = QS('#music.vis #mu_th>img');
if (o) {
if (o && r.cover) {
var url = r.cover.slice(0, -1) + 'wf3';
set_loaded(o, false);
@ -9456,7 +9456,7 @@ var settheme = (function () {
var html = [],
cb = ebi('themes'),
itheme = ax.indexOf(theme[0]) * 2 + (light ? 1 : 0),
names = ['flat dark', 'flat light', 'fancy dark', 'fancy light', 'vice', 'hotdog stand', 'hacker', 'hi-con', 'phi95 dark', 'phi95'];
names = ['flat dark', 'flat light', 'fancy dark', 'fancy light', 'vice', 'hotdog stand', 'hacker', 'hi-con', 'phi95 dark', 'phi95', ];
for (var a = 0; a < themes; a++)
html.push('<option value="{0}">{0} ┃ {1}</option>'.format(a, names[a] || 'custom'));