summaryrefslogtreecommitdiff
path: root/src/ir/drop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/drop.cpp')
-rw-r--r--src/ir/drop.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ir/drop.cpp b/src/ir/drop.cpp
index d033c0876..49bff55f7 100644
--- a/src/ir/drop.cpp
+++ b/src/ir/drop.cpp
@@ -75,10 +75,10 @@ Expression* getDroppedChildrenAndAppend(Expression* curr,
contents.push_back(child);
}
}
- contents.push_back(last);
- if (contents.size() == 1) {
- return contents[0];
+ if (contents.empty()) {
+ return last;
}
+ contents.push_back(last);
return builder.makeBlock(contents);
}