Changeset - 78ecf5feebe4
[Not reviewed]
default
0 2 0
Jason Maltzen - 9 years ago 2015-12-23 23:52:36
jason@hiddenachievement.com
Fix a crash with potential multi-threaded access to paint recipes.
2 files changed with 17 insertions and 1 deletions:
0 comments (0 inline, 0 general)
PaintRecipe.cs
Show inline comments
...
 
@@ -60,2 +60,17 @@ namespace DesertPaintLab
 

	
 
        public PaintRecipe(PaintRecipe other)
 
        {
 
            this.dirty = true;
 
            this.reactions = other.reactions;
 
            foreach (string reagentName in other.reagents)
 
            {
 
                this.reagents.Add(reagentName);
 
            }
 
            foreach (RecipeIngredient copyIngredient in other.recipe)
 
            {
 
                RecipeIngredient ingredient = new RecipeIngredient(copyIngredient.name, copyIngredient.quantity);
 
                this.recipe.Add(ingredient);
 
            }
 
        }
 

	
 
        public List<RecipeIngredient> Ingredients
RecipeGeneratorWindow.cs
Show inline comments
...
 
@@ -202,2 +202,3 @@ namespace DesertPaintLab
 
        {
 
            PaintRecipe recipe = new PaintRecipe(args.Recipe); // copy it
 
            Gtk.Application.Invoke(delegate
...
 
@@ -228,3 +229,3 @@ namespace DesertPaintLab
 
                }
 
                profile.SetRecipe(args.Recipe);
 
                profile.SetRecipe(recipe);
 
            });
0 comments (0 inline, 0 general)