From c96af96e4cfada382080aaa6ffa735229f9b68c7 Mon Sep 17 00:00:00 2001 From: Rawng Date: Sun, 7 Jun 2015 19:55:08 -0400 Subject: Don't segfault when inserting remote maps into DB. --- src/map/map.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 (); -- cgit v1.2.3-70-g09d2