Fixed segfault that could occur when pressing space
This commit is contained in:
parent
eea76b7e5b
commit
978b201464
2
main.go
2
main.go
@ -278,7 +278,7 @@ func insertGeneric (expression Expression) {
|
||||
|
||||
operation, isOperation := selectedExpression.(*Operation)
|
||||
|
||||
if (isOperation && len(operation.operands) < 1) || parent == nil {
|
||||
if isOperation && (len(operation.operands) < 1 || parent == nil) {
|
||||
// if we have an empty operation selected, always insert the
|
||||
// new expression into it
|
||||
operation.Adopt(expression)
|
||||
|
Loading…
Reference in New Issue
Block a user