Browse Source

Fixed setUserPointer() not replacing pointer

Paul-Louis Ageneau 5 years ago
parent
commit
35cb9ea4be
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/rtc.cpp

+ 1 - 1
src/rtc.cpp

@@ -57,7 +57,7 @@ void *getUserPointer(int id) {
 void setUserPointer(int i, void *ptr) {
 	std::lock_guard lock(mutex);
 	if (ptr)
-		userPointerMap.insert(std::make_pair(i, ptr));
+		userPointerMap[i] = ptr;
 	else
 		userPointerMap.erase(i);
 }