Skip to content

Commit

Permalink
Fix: Prevent canvas stateStack overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SonarSonic committed Jul 14, 2024
1 parent 0e1732a commit c04ffa5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/drawingbot/render/renderer/JFXRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ public void doRender() {

//Re-Render the canvas if the Display Mode is dirty
if(jfxDisplayMode.isRenderDirty(this)){
graphicsFX.restore(); //if the last render failed, clear the stateStack

graphicsFX.setGlobalBlendMode(BlendMode.SRC_OVER);
graphicsFX.setTransform(1, 0, 0, 1, 0, 0);
graphicsFX.save();
Expand Down

0 comments on commit c04ffa5

Please sign in to comment.