1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-25 01:36:38 +00:00

Fix possible world map crash

This commit is contained in:
fgenesis 2022-12-09 04:21:46 +01:00
parent b17afecd4b
commit 559a5b39e3

View file

@ -1212,6 +1212,8 @@ Vector WorldMapRender::getAvatarWorldMapPosition()
Vector WorldMapRender::getWorldToTile(WorldMapTile *tile, Vector position, bool fromCenter, bool tilePos)
{
if(!tile->q)
return Vector();
const float sizew = (float)tile->q->texture->width;
const float halfw = sizew / 2.0f;
const float sizeh = (float)tile->q->texture->height;
@ -1412,7 +1414,7 @@ void WorldMapRender::toggle(bool turnON)
//setVis(activeTile);
// just set the color
if (activeTile)
if (activeTile && activeTile->q)
{
activeTile->q->color = Vector(1,1,1);
activeTile->q->alphaMod = 1;