Closed mewmew closed 6 years ago
Thank you for reporting this. The crash is because of a missing cleanup of the current hovered level object when loading a new level. If you load level 1 again and try not to have you mouse over any level object in town, it won't crash when walking on level 1.
To fix this, add the last line to this function in Level.cpp
void Level::Init(const LevelMap& map_, Min& min_, CelFrameCache& cel_)
{
map = map_;
currentMapPosition = MapCoord(map.Width() / 2, map.Height() / 2);
tiles = LevelHelper::loadTilesetSprite(cel_, min_, false);
tiles2 = LevelHelper::loadTilesetSprite(cel_, min_, true);
hoverObject = nullptr; // add this to fix crash
}
If you now load a level and have the mouse hovering the "door" object, it will no longer crash when walking on level 1.
Edit: Fixed on the last commit 1a022c6.
So can the report be closed?
@sskras The report can be closed indeed. This has been fixed. Now I'm stuck on another crash #16.
core dump
on revision 4df29d19e51bc5fb331abaa51377063f6f863cc4
https://media.giphy.com/media/l4FGIY0BFuqi7i8UM/giphy.gif