summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/Library.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-04-07 00:27:24 +0200
committerPetr Mrázek <peterix@gmail.com>2017-04-07 00:27:24 +0200
commit795889d934e8f4ebe89be1a49a3417fd98e89be1 (patch)
treec5b0d30d425003c4b88e84a2908e63eb5ed797b9 /api/logic/minecraft/Library.cpp
parent160b5033a79e6b5ee9f3e2a001b96c677f41ddcb (diff)
parent8e58d61150b0bdbe9eb91065d36342f3004fe97b (diff)
downloadMultiMC-795889d934e8f4ebe89be1a49a3417fd98e89be1.tar
MultiMC-795889d934e8f4ebe89be1a49a3417fd98e89be1.tar.gz
MultiMC-795889d934e8f4ebe89be1a49a3417fd98e89be1.tar.lz
MultiMC-795889d934e8f4ebe89be1a49a3417fd98e89be1.tar.xz
MultiMC-795889d934e8f4ebe89be1a49a3417fd98e89be1.zip
Merge branch 'feature/meta' into develop
Diffstat (limited to 'api/logic/minecraft/Library.cpp')
-rw-r--r--api/logic/minecraft/Library.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/api/logic/minecraft/Library.cpp b/api/logic/minecraft/Library.cpp
index 5a75fe79..7521a049 100644
--- a/api/logic/minecraft/Library.cpp
+++ b/api/logic/minecraft/Library.cpp
@@ -30,14 +30,15 @@ void Library::getApplicableFiles(OpSys system, QStringList& jar, QStringList& na
};
if(m_mojangDownloads)
{
- if(m_mojangDownloads->artifact)
+ if(!isNative())
{
- auto artifact = m_mojangDownloads->artifact;
- jar += actualPath(artifact->path);
+ if(m_mojangDownloads->artifact)
+ {
+ auto artifact = m_mojangDownloads->artifact;
+ jar += actualPath(artifact->path);
+ }
}
- if(!isNative())
- return;
- if(m_nativeClassifiers.contains(system))
+ else if(m_nativeClassifiers.contains(system))
{
auto nativeClassifier = m_nativeClassifiers[system];
if(nativeClassifier.contains("${arch}"))
@@ -55,7 +56,15 @@ void Library::getApplicableFiles(OpSys system, QStringList& jar, QStringList& na
}
else
{
- native += actualPath(m_mojangDownloads->getDownloadInfo(nativeClassifier)->path);
+ auto dlinfo = m_mojangDownloads->getDownloadInfo(nativeClassifier);
+ if(!dlinfo)
+ {
+ qWarning() << "Cannot get native for" << nativeClassifier << "while processing" << m_name;
+ }
+ else
+ {
+ native += actualPath(dlinfo->path);
+ }
}
}
}