Skip to content

Commit

Permalink
fix create-drawing-object: avoid creating an empty string surface
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxxr committed Aug 2, 2023
1 parent 01423a5 commit 4d69f74
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontends/sdl2/text-buffer.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@
(let ((string (line-end-item-text item))
(attribute (line-end-item-attribute item)))
(loop :for (type . string) :in (split-string-by-character-type string)
:unless (alexandria:emptyp string)
:collect (multiple-value-bind (surface attribute)
(make-text-surface-with-attribute string attribute :type type)
(make-instance 'line-end-object
Expand All @@ -448,6 +449,7 @@
:attribute attribute)))
(t
(loop :for (type . string) :in (split-string-by-character-type string)
:unless (alexandria:emptyp string)
:collect (multiple-value-bind (surface attribute)
(make-text-surface-with-attribute string attribute :type type)
(make-instance 'text-object
Expand Down

0 comments on commit 4d69f74

Please sign in to comment.