summaryrefslogtreecommitdiff
path: root/src/search/SearchModel.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-21 00:17:42 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-21 00:17:42 (GMT)
commit36a952ca4dfc4672e1f0d2f7d255ef9c3bd046eb (patch)
treed1ddfb7a9865608565fbb2f0d0688c662ab45817 /src/search/SearchModel.cpp
parent0e5a46aa64bd9c53b0eb02aadd67637d9488b765 (diff)
downloadpowder-36a952ca4dfc4672e1f0d2f7d255ef9c3bd046eb.zip
powder-36a952ca4dfc4672e1f0d2f7d255ef9c3bd046eb.tar.gz
Better handling of save vector from client
Diffstat (limited to 'src/search/SearchModel.cpp')
-rw-r--r--src/search/SearchModel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp
index 96d340a..3b2d0e0 100644
--- a/src/search/SearchModel.cpp
+++ b/src/search/SearchModel.cpp
@@ -12,7 +12,9 @@ void SearchModel::UpdateSaveList(std::string query)
lastError = "";
saveList.clear();
notifySaveListChanged();
- saveList = Client::Ref().SearchSaves(0, 12, query, "");
+ vector<Save*> * tempSaveList = Client::Ref().SearchSaves(0, 12, query, "");
+ saveList = *tempSaveList;
+ delete tempSaveList;
if(!saveList.size())
{
lastError = Client::Ref().GetLastError();
@@ -24,7 +26,7 @@ void SearchModel::UpdateSaveList(std::string query)
notifySaveListChanged();
}
-vector<Save> SearchModel::GetSaveList()
+vector<Save*> SearchModel::GetSaveList()
{
return saveList;
}