summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-10-09 03:10:56 +0100
committerSky <git@bunnies.cc>2013-10-09 03:10:56 +0100
commit595943244ca929e5c566a78efae9a017ebaed69f (patch)
tree60a49a80bde87bedc5eb1ed8bdff06f9c5be4217 /gui
parent14b47057fdbcec7d259ae0a73b201f3f0757b8e2 (diff)
downloadMultiMC-595943244ca929e5c566a78efae9a017ebaed69f.tar
MultiMC-595943244ca929e5c566a78efae9a017ebaed69f.tar.gz
MultiMC-595943244ca929e5c566a78efae9a017ebaed69f.tar.lz
MultiMC-595943244ca929e5c566a78efae9a017ebaed69f.tar.xz
MultiMC-595943244ca929e5c566a78efae9a017ebaed69f.zip
Fall back to mod ID if name is missing for some reason
Diffstat (limited to 'gui')
-rw-r--r--gui/MCModInfoFrame.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/gui/MCModInfoFrame.cpp b/gui/MCModInfoFrame.cpp
index a0458cbc..51651e33 100644
--- a/gui/MCModInfoFrame.cpp
+++ b/gui/MCModInfoFrame.cpp
@@ -24,8 +24,12 @@ void MCModInfoFrame::updateWithMod(Mod &m)
}
QString text = "";
- if(m.homeurl().isEmpty()) text = m.name();
- else text = "<a href=\"" + m.homeurl() + "\">" + m.name() + "</a>";
+ QString name = "";
+ 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();
setModText(text);