Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Staging:C:DVD
file-roller
file-roller-fix-crash-extracting-file.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File file-roller-fix-crash-extracting-file.patch of Package file-roller
commit 0ae6cf61db69c1fc5a8ca9095e1d1e65e1e81a20 Author: Paolo Bacchilega <paobac@src.gnome.org> Date: Sat Feb 18 08:54:53 2017 +0100 fixed crash after extracting a file [bug #778846] diff --git a/src/fr-window.c b/src/fr-window.c index a3ad349..bf75902 100644 --- a/src/fr-window.c +++ b/src/fr-window.c @@ -6428,7 +6428,7 @@ extract_data_new (FrWindow *window, ExtractData *edata; edata = g_new0 (ExtractData, 1); - edata->window = window; + edata->window = _g_object_ref (window); edata->file_list = _g_string_list_dup (file_list); edata->destination = _g_object_ref (destination); edata->skip_older = skip_older; @@ -6450,6 +6450,7 @@ extract_data_free (ExtractData *edata) _g_string_list_free (edata->file_list); _g_object_unref (edata->destination); + _g_object_unref (edata->window); g_free (edata->base_dir); g_free (edata); @@ -6593,6 +6594,29 @@ _fr_window_archive_extract_from_edata (FrWindow *window, static void _fr_window_ask_overwrite_dialog (OverwriteData *odata); +static OverwriteData * +overwrite_data_new (FrWindow *window) +{ + OverwriteData *odata; + + odata = g_new0 (OverwriteData, 1); + odata->window = _g_object_ref (window); + odata->edata = NULL; + odata->current_file = NULL; + odata->extract_all = FALSE; + + return odata; +} + + +static void +overwrite_data_free (OverwriteData *odata) +{ + _g_object_unref (odata->window); + g_free (odata); +} + + /* remove the file from the list to extract */ static void overwrite_data_skip_current (OverwriteData *odata) @@ -6640,7 +6664,7 @@ overwrite_dialog_response_cb (GtkDialog *dialog, if (do_not_extract) { fr_window_batch_stop (odata->window); - g_free (odata); + overwrite_data_free (odata); return; } @@ -6771,7 +6795,7 @@ _fr_window_ask_overwrite_dialog (OverwriteData *odata) fr_window_dnd_extraction_finished (odata->window, TRUE); } - g_free (odata); + overwrite_data_free (odata); } @@ -6899,8 +6923,7 @@ _fr_window_archive_extract_from_edata_maybe (FrWindow *window, if (edata->overwrite == FR_OVERWRITE_ASK) { OverwriteData *odata; - odata = g_new0 (OverwriteData, 1); - odata->window = window; + odata = overwrite_data_new (window); odata->edata = edata; odata->extract_all = (edata->file_list == NULL) || (g_list_length (edata->file_list) == window->archive->files->len); if (edata->file_list == NULL)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor