mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
check to see if s.builder is nil
This commit is contained in:
@@ -124,7 +124,7 @@ setup_once :: proc(s: ^State, builder: ^strings.Builder) {
|
|||||||
// returns true when the builder had content to be cleared
|
// returns true when the builder had content to be cleared
|
||||||
// clear builder&selection and the undo|redo stacks
|
// clear builder&selection and the undo|redo stacks
|
||||||
clear_all :: proc(s: ^State) -> (cleared: bool) {
|
clear_all :: proc(s: ^State) -> (cleared: bool) {
|
||||||
if len(s.builder.buf) > 0 {
|
if s.builder != nil && len(s.builder.buf) > 0 {
|
||||||
clear(&s.builder.buf)
|
clear(&s.builder.buf)
|
||||||
s.selection = {}
|
s.selection = {}
|
||||||
cleared = true
|
cleared = true
|
||||||
|
|||||||
Reference in New Issue
Block a user