mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-26 02:07:26 +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)
|
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 sizew = (float)tile->q->texture->width;
|
||||||
const float halfw = sizew / 2.0f;
|
const float halfw = sizew / 2.0f;
|
||||||
const float sizeh = (float)tile->q->texture->height;
|
const float sizeh = (float)tile->q->texture->height;
|
||||||
|
@ -1412,7 +1414,7 @@ void WorldMapRender::toggle(bool turnON)
|
||||||
//setVis(activeTile);
|
//setVis(activeTile);
|
||||||
|
|
||||||
// just set the color
|
// just set the color
|
||||||
if (activeTile)
|
if (activeTile && activeTile->q)
|
||||||
{
|
{
|
||||||
activeTile->q->color = Vector(1,1,1);
|
activeTile->q->color = Vector(1,1,1);
|
||||||
activeTile->q->alphaMod = 1;
|
activeTile->q->alphaMod = 1;
|
||||||
|
|
Loading…
Reference in a new issue