Skip to content

Commit

Permalink
Fix DbZ in appkit when application width is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
borodust committed Jul 26, 2020
1 parent 6738b95 commit 66557b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions appkit/appkit.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@
this
(let* ((canvas-width (or this-canvas-width viewport-width))
(canvas-height (or this-canvas-height viewport-height))
(canvas-aspect (/ viewport-width canvas-width)))
(canvas-aspect (if (zerop canvas-width) 0 (/ viewport-width canvas-width))))
(ge.vg:update-canvas-size canvas canvas-width canvas-height)
(ge.vg:update-canvas-pixel-ratio canvas (* pixel-ratio canvas-aspect)))
(ge.vg:update-canvas-pixel-ratio canvas (* pixel-ratio (if (zerop canvas-aspect) 1 canvas-aspect))))
(ge.ui:update-ui-size ui viewport-width viewport-height)
(ge.ui:update-ui-pixel-ratio ui pixel-ratio)))

Expand Down

0 comments on commit 66557b9

Please sign in to comment.