Przeglądaj źródła

Fix memory leak: remove InventoryAction after sending and applying

PilzAdam 11 lat temu
rodzic
commit
5068cb40ce
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      src/client.cpp

+ 3 - 0
src/client.cpp

@@ -2555,6 +2555,9 @@ void Client::inventoryAction(InventoryAction *a)
 		Predict some local inventory changes
 	*/
 	a->clientApply(this, this);
+
+	// Remove it
+	delete a;
 }
 
 ClientActiveObject * Client::getSelectedActiveObject(