diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-12-13 14:02:27 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-12-13 14:44:19 (GMT) |
commit | bd9d5c80235ce6d1b005df96c3058b75e82bd6f0 (patch) | |
tree | 1467ba66629b21fcdf5dc136e3fefea91a3c6f8f /imports | |
parent | a02a747a9d5294127dfe3e676a2759e228257e70 (diff) | |
download | Qt-bd9d5c80235ce6d1b005df96c3058b75e82bd6f0.zip Qt-bd9d5c80235ce6d1b005df96c3058b75e82bd6f0.tar.gz Qt-bd9d5c80235ce6d1b005df96c3058b75e82bd6f0.tar.bz2 |
Add a small protection against releasing a timer twice.
The cell corresponding to an allocated timer ID in the free list is unused
(because the ID isn't free). So use it to store an invalid value that we
can check against the user's value.
This provides some protection against a given timer being released twice.
Since we store the serial counter of the nextFreeTimerId, getting the
same ID twice is a 1-in-128 chance.
Reviewed-By: Bradley T. Hughes
Diffstat (limited to 'imports')
0 files changed, 0 insertions, 0 deletions