Skip to content

Commit

Permalink
Merge pull request #92470 from timothyqiu/drop-error
Browse files Browse the repository at this point in the history
Fix error when dropping image onto the scene dock
  • Loading branch information
akien-mga committed May 28, 2024
2 parents 345e10d + 8a17acf commit e408c77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/scene_tree_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3333,9 +3333,9 @@ void SceneTreeDock::_files_dropped(const Vector<String> &p_files, NodePath p_to,
// Either instantiate scenes or create AudioStreamPlayers.
int to_pos = -1;
_normalize_drop(node, to_pos, p_type);
if (res_type == "PackedScene") {
if (ClassDB::is_parent_class(res_type, "PackedScene")) {
_perform_instantiate_scenes(p_files, node, to_pos);
} else {
} else if (ClassDB::is_parent_class(res_type, "AudioStream")) {
_perform_create_audio_stream_players(p_files, node, to_pos);
}
}
Expand Down

0 comments on commit e408c77

Please sign in to comment.