Fixed segfault that could occur when pressing space

This commit is contained in:
Sasha Koshka 2022-11-21 18:27:44 -05:00
parent eea76b7e5b
commit 978b201464
1 changed files with 1 additions and 1 deletions

View File

@ -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)