Browse Source

fix recipie ingredient filter not loaded correctly

Kolja Strohm 9 months ago
parent
commit
df57d03a8d
1 changed files with 4 additions and 4 deletions
  1. 4 4
      FactoryCraft/Recipie.cpp

+ 4 - 4
FactoryCraft/Recipie.cpp

@@ -21,8 +21,8 @@ RecipieInput::~RecipieInput()
 
 
 void RecipieInput::setFilter(ItemFilter* filter)
 void RecipieInput::setFilter(ItemFilter* filter)
 {
 {
-    if (filter) filter->release();
-    filter = filter;
+    if (this->filter) this->filter->release();
+    this->filter = filter;
 }
 }
 
 
 ItemFilter* RecipieInput::zFilter() const
 ItemFilter* RecipieInput::zFilter() const
@@ -32,8 +32,8 @@ ItemFilter* RecipieInput::zFilter() const
 
 
 void RecipieInput::setModifier(ItemModifier* modifier)
 void RecipieInput::setModifier(ItemModifier* modifier)
 {
 {
-    if (modifier) modifier->release();
-    modifier = modifier;
+    if (this->modifier) this->modifier->release();
+    this->modifier = modifier;
 }
 }
 
 
 ItemModifier* RecipieInput::zModifier() const
 ItemModifier* RecipieInput::zModifier() const