Fall back to mod ID if name is missing for some reason

This commit is contained in:
Sky 2013-10-09 03:10:56 +01:00
parent 14b47057fd
commit 595943244c

View File

@ -24,8 +24,12 @@ void MCModInfoFrame::updateWithMod(Mod &m)
} }
QString text = ""; QString text = "";
if(m.homeurl().isEmpty()) text = m.name(); QString name = "";
else text = "<a href=\"" + m.homeurl() + "\">" + m.name() + "</a>"; if(m.name().isEmpty()) name = m.id();
else name = m.name();
if(m.homeurl().isEmpty()) text = name;
else text = "<a href=\"" + m.homeurl() + "\">" + name + "</a>";
if(!m.authors().isEmpty()) text += " by " + m.authors(); if(!m.authors().isEmpty()) text += " by " + m.authors();
setModText(text); setModText(text);