diff --git a/dDatabase/GameDatabase/MySQL/Tables/Property.cpp b/dDatabase/GameDatabase/MySQL/Tables/Property.cpp index 8aaf93c4..bf372874 100644 --- a/dDatabase/GameDatabase/MySQL/Tables/Property.cpp +++ b/dDatabase/GameDatabase/MySQL/Tables/Property.cpp @@ -56,6 +56,7 @@ std::optional MySQLDatabase::GetProperties(co params.playerId ); if (count->next()) { + if (!result) result = IProperty::PropertyEntranceResult(); result->totalEntriesMatchingQuery = count->getUInt("count"); } } else { @@ -109,11 +110,13 @@ std::optional MySQLDatabase::GetProperties(co params.playerSort ); if (count->next()) { + if (!result) result = IProperty::PropertyEntranceResult(); result->totalEntriesMatchingQuery = count->getUInt("count"); } } while (properties->next()) { + if (!result) result = IProperty::PropertyEntranceResult(); auto& entry = result->entries.emplace_back(); entry.id = properties->getUInt64("id"); entry.ownerId = properties->getUInt64("owner_id");