summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-10-09 08:59:47 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2019-10-09 22:51:42 +0000
commit1c751bddb0865df4795ba3092b727f737ec0e875 (patch)
tree09628085f6bad473219ce669eb0974c6c28bd194 /src
parentMinimise artefacts on edge of color wheel (diff)
downloadinkscape-1c751bddb0865df4795ba3092b727f737ec0e875.tar.gz
inkscape-1c751bddb0865df4795ba3092b727f737ec0e875.zip
Fix memory leaks in color wheel
Diffstat (limited to 'src')
-rw-r--r--src/ui/widget/ink-color-wheel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/widget/ink-color-wheel.cpp b/src/ui/widget/ink-color-wheel.cpp
index f89e873d3..cf0de610b 100644
--- a/src/ui/widget/ink-color-wheel.cpp
+++ b/src/ui/widget/ink-color-wheel.cpp
@@ -240,6 +240,8 @@ ColorWheel::on_draw(const::Cairo::RefPtr<::Cairo::Context>& cr) {
cr->stroke();
cr->restore();
+ g_free(buffer_ring);
+
// Draw focus
if (has_focus() && _focus_on_ring) {
Glib::RefPtr<Gtk::StyleContext> style_context = get_style_context();
@@ -347,7 +349,8 @@ ColorWheel::on_draw(const::Cairo::RefPtr<::Cairo::Context>& cr) {
cr->fill();
cr->restore();
-
+ g_free(buffer_triangle);
+
// Draw marker
double mx = x1 + (x2-x1) * _value + (x0-x2) * _saturation * _value;
double my = y1 + (y2-y1) * _value + (y0-y2) * _saturation * _value;