Ignore:
Timestamp:
Aug 23, 2010, 3:56:09 AM (10 years ago)
Author:
sam
Message:

Properly implement program termination, including in the GTK program.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/font.cpp

    r156 r170  
    7575    Entity::TickDraw(deltams);
    7676
    77     if (data->img)
     77    if (destroy)
     78    {
     79        if (data->img)
     80            SDL_FreeSurface(data->img);
     81        else
     82            glDeleteTextures(1, &data->texture);
     83    }
     84    else if (data->img)
    7885    {
    7986        data->width = data->img->w / 16;
     
    9198        SDL_FreeSurface(data->img);
    9299        data->img = NULL;
    93     }
    94     else if (ref == 0)
    95     {
    96         glDeleteTextures(1, &data->texture);
    97         destroy = 1;
    98100    }
    99101}
Note: See TracChangeset for help on using the changeset viewer.