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:
parent
b17afecd4b
commit
559a5b39e3
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue