Fix crashing when editing the TileSet field

This commit is contained in:
Kongfa Waroros 2022-10-10 00:37:47 +07:00
parent ca25c6e0a3
commit e81e81a56e
2 changed files with 3 additions and 3 deletions

View File

@ -268,8 +268,8 @@ List<int> TilesEditorPlugin::get_sorted_sources(const Ref<TileSet> p_tile_set) c
SourceNameComparator::tile_set = p_tile_set; SourceNameComparator::tile_set = p_tile_set;
List<int> source_ids; List<int> source_ids;
for (int i = 0; i < tile_set->get_source_count(); i++) { for (int i = 0; i < p_tile_set->get_source_count(); i++) {
source_ids.push_back(tile_set->get_source_id(i)); source_ids.push_back(p_tile_set->get_source_id(i));
} }
switch (source_sort) { switch (source_sort) {

View File

@ -122,7 +122,7 @@ public:
// Sorting. // Sorting.
void set_sorting_option(int p_option); void set_sorting_option(int p_option);
List<int> get_sorted_sources(const Ref<TileSet> tile_set) const; List<int> get_sorted_sources(const Ref<TileSet> p_tile_set) const;
virtual void edit(Object *p_object) override; virtual void edit(Object *p_object) override;
virtual bool handles(Object *p_object) const override; virtual bool handles(Object *p_object) const override;