瀏覽代碼

Dispose shaders in noise node

Jakub Ciemała 3 周之前
父節點
當前提交
e2cc3bd1b1
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/NoiseNode.cs

+ 2 - 0
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/NoiseNode.cs

@@ -86,6 +86,7 @@ public class NoiseNode : RenderNode
                 return;
             }
 
+            paint?.Shader?.Dispose();
             paint.Shader = shader;
 
             // Define a grayscale color filter to apply to the image
@@ -124,6 +125,7 @@ public class NoiseNode : RenderNode
             return false;
         }
         
+        paint?.Shader?.Dispose();
         paint.Shader = shader;
         paint.ColorFilter = grayscaleFilter;