Kaydet (Commit) 4450d6bb authored tarafından Mark Wielaard's avatar Mark Wielaard Kaydeden (comit) Caolán McNamara

Fix memory leak in SalGtkFilePicker::SalGtkFilePicker.

The result of gtk_widget_create_pango_layout should be unrefed when done.

Change-Id: I46c220a933a2dac42ec21e9e2904938bc4649dbd
Reviewed-on: https://gerrit.libreoffice.org/4157Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst a9e0ec2b
...@@ -301,6 +301,8 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext ...@@ -301,6 +301,8 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
PangoRectangle row_height; PangoRectangle row_height;
pango_layout_set_markup (layout, "All Files", -1); pango_layout_set_markup (layout, "All Files", -1);
pango_layout_get_pixel_extents (layout, NULL, &row_height); pango_layout_get_pixel_extents (layout, NULL, &row_height);
g_object_unref (layout);
g_object_get (cell, "ypad", &ypad, (char *)NULL); g_object_get (cell, "ypad", &ypad, (char *)NULL);
guint height = (row_height.height + 2*ypad) * 5; guint height = (row_height.height + 2*ypad) * 5;
gtk_widget_set_size_request (m_pFilterView, -1, height); gtk_widget_set_size_request (m_pFilterView, -1, height);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment