diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-17 10:24:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-17 13:02:38 +0200 |
commit | 370577a641b77b6cf0a08fa73a1ae62fd0bea15b (patch) | |
tree | 2d0d090e0d98fddd68e475d1f2c3a892b95d84cd /vcl/unx/gtk3/customcellrenderer.cxx | |
parent | 4f7560240d8a9273fd5ecbc76e7ac054b3a6e4ae (diff) |
gtk4: guard vcl calls from gtk
Change-Id: Iff35ff96c5df987258979b388485af4f3d1f039e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122240
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk3/customcellrenderer.cxx')
-rw-r--r-- | vcl/unx/gtk3/customcellrenderer.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/customcellrenderer.cxx b/vcl/unx/gtk3/customcellrenderer.cxx index c43638648dc6..94d6a01f2cee 100644 --- a/vcl/unx/gtk3/customcellrenderer.cxx +++ b/vcl/unx/gtk3/customcellrenderer.cxx @@ -30,7 +30,11 @@ G_DEFINE_TYPE(CustomCellRenderer, custom_cell_renderer, GTK_TYPE_CELL_RENDERER_T static void custom_cell_renderer_init(CustomCellRenderer* self) { - new (&self->device) VclPtr<VirtualDevice>; + { + SolarMutexGuard aGuard; + new (&self->device) VclPtr<VirtualDevice>; + } + // prevent loplugin:unreffun firing on macro generated function (void)custom_cell_renderer_get_instance_private(self); } @@ -96,8 +100,12 @@ static void custom_cell_renderer_finalize(GObject* object) CustomCellRenderer* cellsurface = CUSTOM_CELL_RENDERER(object); g_free(cellsurface->id); - cellsurface->device.disposeAndClear(); - cellsurface->device.~VclPtr<VirtualDevice>(); + + { + SolarMutexGuard aGuard; + cellsurface->device.disposeAndClear(); + cellsurface->device.~VclPtr<VirtualDevice>(); + } G_OBJECT_CLASS(custom_cell_renderer_parent_class)->finalize(object); } |