瀏覽代碼

Fixed an issue where unsubscribing from a message didn't properly remove the subscription

Marko Pintera 10 年之前
父節點
當前提交
9e0a56737c
共有 2 個文件被更改,包括 4 次插入3 次删除
  1. 3 2
      BansheeUtility/Source/BsMessageHandler.cpp
  2. 1 1
      MBansheeEditor/EditorApplication.cs

+ 3 - 2
BansheeUtility/Source/BsMessageHandler.cpp

@@ -75,11 +75,12 @@ namespace BansheeEngine
 		{
 			Vector<MessageHandlerData>& handlerData = iterFind->second;
 
-			std::remove_if(handlerData.begin(), handlerData.end(), 
+			handlerData.erase(
+				std::remove_if(handlerData.begin(), handlerData.end(), 
 				[&](MessageHandlerData& x)
 				{
 					return x.id == handleId;
-				});
+				}));
 		}
 
 		mHandlerIdToMessageMap.erase(handleId);

+ 1 - 1
MBansheeEditor/EditorApplication.cs

@@ -118,7 +118,7 @@ namespace BansheeEditor
             gizmoDbgObject.AddComponent<DbgGizmoComponent>();
 
             //ProgressBar.Show("Test", 0.5f);
-            ColorPicker.Show();
+            //ColorPicker.Show();
 
             // DEBUG ONLY END
         }