Fix segfault when oracle reads card without "num" field (#5654)

This commit is contained in:
RickyRister
2025-02-25 18:29:43 -05:00
committed by GitHub
parent 57e37e8f4d
commit 49932ee6f8
+1 -1
View File
@@ -289,7 +289,7 @@ int OracleImporter::importCardsFromSet(const CardSetPtr &currentSet, const QList
QString numComponent; QString numComponent;
const QString numProperty = setInfo.getProperty("num"); const QString numProperty = setInfo.getProperty("num");
const QChar lastChar = numProperty.at(numProperty.size() - 1); const QChar lastChar = numProperty.isEmpty() ? QChar() : numProperty.back();
// Un-Sets do some wonky stuff. Split up these cards as individual entries. // Un-Sets do some wonky stuff. Split up these cards as individual entries.
if (setsWithCardsWithSameNameButDifferentText.contains(currentSet->getShortName()) && if (setsWithCardsWithSameNameButDifferentText.contains(currentSet->getShortName()) &&