Changeset 225


Ignore:
Timestamp:
Jan 18, 2011, 3:51:05 PM (9 years ago)
Author:
sam
Message:

Fix a refcount bug in the entity dictionary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/dict.cpp

    r221 r225  
    4141    ~DictData()
    4242    {
     43#if !FINAL_RELEASE
    4344        if (nentities)
    4445            fprintf(stderr, "ERROR: still %i entities in dict\n", nentities);
     46#endif
    4547        free(entities);
    4648    }
     
    104106{
    105107    if (Ticker::Unref(data->entities[id]) == 0)
     108    {
    106109        data->entities[id] = NULL;
    107     data->nentities--;
     110        if (data->nentities)
     111            data->nentities--;
     112#if !FINAL_RELEASE
     113        else
     114            fprintf(stderr, "ERROR: removing entity from empty dict\n");
     115#endif
     116    }
    108117}
    109118
Note: See TracChangeset for help on using the changeset viewer.