Fixed segfault that could occur when pressing space
This commit is contained in:
2
main.go
2
main.go
@@ -278,7 +278,7 @@ func insertGeneric (expression Expression) {
|
|||||||
|
|
||||||
operation, isOperation := selectedExpression.(*Operation)
|
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
|
// if we have an empty operation selected, always insert the
|
||||||
// new expression into it
|
// new expression into it
|
||||||
operation.Adopt(expression)
|
operation.Adopt(expression)
|
||||||
|
|||||||
Reference in New Issue
Block a user