Skip to content

Commit 99c06e6

Browse files
committed
Core: Sidestep GCC false-positive
1 parent 540ea0b commit 99c06e6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scene/resources/packed_scene.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
181181
const NodeData *nd = &nodes[0];
182182

183183
Node **ret_nodes = (Node **)alloca(sizeof(Node *) * nc);
184+
ret_nodes[0] = nullptr; // Sidesteps "false positive" warnings on GCC.
184185

185186
bool gen_node_path_cache = p_edit_state != GEN_EDIT_STATE_DISABLED && node_path_cache.is_empty();
186187

0 commit comments

Comments
 (0)