summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRawng <rawng.github@gmail.com>2015-06-07 19:55:08 -0400
committerRawng <rawng.github@gmail.com>2015-06-07 20:12:31 -0400
commitc96af96e4cfada382080aaa6ffa735229f9b68c7 (patch)
tree1301c0a2682eb5367fbc98cb023419fd70c19219 /src
parent182e82a79c0455b6e6734b1cb6d83cfcd7f28d61 (diff)
downloadtmwa-c96af96e4cfada382080aaa6ffa735229f9b68c7.tar.gz
tmwa-c96af96e4cfada382080aaa6ffa735229f9b68c7.tar.bz2
tmwa-c96af96e4cfada382080aaa6ffa735229f9b68c7.tar.xz
tmwa-c96af96e4cfada382080aaa6ffa735229f9b68c7.zip
Don't segfault when inserting remote maps into DB.
Diffstat (limited to 'src')
-rw-r--r--src/map/map.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/map.cpp b/src/map/map.cpp
index 7d219a9..d40977f 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -1237,7 +1237,8 @@ int map_setipport(MapName name, IP4Address ip, int port)
mdos->gat = nullptr;
mdos->ip = ip;
mdos->port = port;
- maps_db.put(mdos->name_, std::move(mdos));
+ MapName mName = mdos->name_;
+ maps_db.put(mName, std::move(mdos));
}
}
OMATCH_END ();