mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
libfreerdp-codec: allow region_uninit to be called multiple times
This commit is contained in:
parent
a7eb109200
commit
fdde017526
@ -798,10 +798,12 @@ BOOL region16_intersect_rect(REGION16 *dst, const REGION16 *src, const RECTANGLE
|
|||||||
void region16_uninit(REGION16 *region)
|
void region16_uninit(REGION16 *region)
|
||||||
{
|
{
|
||||||
assert(region);
|
assert(region);
|
||||||
assert(region->data);
|
|
||||||
|
|
||||||
|
if (region->data)
|
||||||
|
{
|
||||||
if (region->data->size)
|
if (region->data->size)
|
||||||
free(region->data);
|
free(region->data);
|
||||||
|
|
||||||
region->data = NULL;
|
region->data = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user