define a setMap for current_metatile_selection_item to prevent crash on project transition
This commit is contained in:
parent
79e384ef76
commit
90aba5e433
2 changed files with 3 additions and 0 deletions
|
@ -15,6 +15,8 @@ public:
|
|||
Map* map = nullptr;
|
||||
MetatileSelector *metatileSelector;
|
||||
void draw();
|
||||
|
||||
void setMap(Map *map) { this->map = map; }
|
||||
};
|
||||
|
||||
#endif // CURRENTSELECTEDMETATILESPIXMAPITEM_H
|
||||
|
|
|
@ -1299,6 +1299,7 @@ void Editor::displayCurrentMetatilesSelection() {
|
|||
|
||||
void Editor::redrawCurrentMetatilesSelection() {
|
||||
if (current_metatile_selection_item) {
|
||||
current_metatile_selection_item->setMap(map);
|
||||
current_metatile_selection_item->draw();
|
||||
emit currentMetatilesSelectionChanged();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue