From 9385c337299731a87764473010e40468b2d52718 Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Tue, 29 Mar 2022 02:33:15 -0700 Subject: [PATCH] grammar and new line --- dGame/dComponents/PropertyEntranceComponent.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dGame/dComponents/PropertyEntranceComponent.cpp b/dGame/dComponents/PropertyEntranceComponent.cpp index 5ee832fd..4065c3fc 100644 --- a/dGame/dComponents/PropertyEntranceComponent.cpp +++ b/dGame/dComponents/PropertyEntranceComponent.cpp @@ -119,6 +119,8 @@ std::string PropertyEntranceComponent::BuildQuery(Entity* entity, int32_t sortMe // Replace trailing comma with the closing parenthesis. if (friendsList.at(friendsList.size() - 1) == ',') friendsList.erase(friendsList.size() - 1, 1); friendsList += ") "; + + // If we have no friends then use a -1 for the query. if (friendsList.find("()") == std::string::npos) { orderBy = friendsList; } else { @@ -128,6 +130,7 @@ std::string PropertyEntranceComponent::BuildQuery(Entity* entity, int32_t sortMe delete friendsListQueryResult; friendsListQueryResult = nullptr; + delete friendsListQuery; friendsListQuery = nullptr; }