Skip to content

Commit 8a17acf

Browse files
committed
Fix error when dropping image onto the scene dock
1 parent be56cab commit 8a17acf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

editor/scene_tree_dock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3333,9 +3333,9 @@ void SceneTreeDock::_files_dropped(const Vector<String> &p_files, NodePath p_to,
33333333
// Either instantiate scenes or create AudioStreamPlayers.
33343334
int to_pos = -1;
33353335
_normalize_drop(node, to_pos, p_type);
3336-
if (res_type == "PackedScene") {
3336+
if (ClassDB::is_parent_class(res_type, "PackedScene")) {
33373337
_perform_instantiate_scenes(p_files, node, to_pos);
3338-
} else {
3338+
} else if (ClassDB::is_parent_class(res_type, "AudioStream")) {
33393339
_perform_create_audio_stream_players(p_files, node, to_pos);
33403340
}
33413341
}

0 commit comments

Comments
 (0)