X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f884a0dccd6b642f35c441ac9bfc87a6d5b4d35..e3276230de335908f70232b2a5ede43665bd8d9d:/src/gtk1/region.cpp diff --git a/src/gtk1/region.cpp b/src/gtk1/region.cpp index b8f140cb72..ea44a6498f 100644 --- a/src/gtk1/region.cpp +++ b/src/gtk1/region.cpp @@ -187,7 +187,9 @@ bool wxRegion::DoUnionWithRect(const wxRect& r) rect.width = r.width; rect.height = r.height; - gdk_region_union_with_rect( M_REGIONDATA->m_region, &rect ); + GdkRegion *reg = gdk_region_union_with_rect( M_REGIONDATA->m_region, &rect ); + gdk_region_destroy( M_REGIONDATA->m_region ); + M_REGIONDATA->m_region = reg; } return TRUE;