+2006-09-04 Kristian Rietveld <kris@imendio.com>
+
+ * gtk/gtkpathbar.c (gtk_path_bar_dispose): don't cancel the
+ operations spawned by buttons here,
+ (set_button_image_get_info_cb): bail out if button is NULL, but
+ do free button_data,
+ (button_data_free): only free the data is non NULL (since this
+ function can be called multiple times for the same data), cancel
+ handle is pending but don't free button_data in this case (will
+ happen in the callback).
+
2006-09-04 Michael Natterer <mitch@imendio.com>
* gtk/gtkrc.c (rc_parse_token_or_compound)
gtk_file_system_cancel_operation (path_bar->set_path_handle);
path_bar->set_path_handle = NULL;
- for (list = path_bar->button_list; list; list = list->next)
- {
- ButtonData *button_data = BUTTON_DATA (list->data);
-
- if (button_data->handle)
- gtk_file_system_cancel_operation (button_data->handle);
- button_data->handle = NULL;
- }
-
G_OBJECT_CLASS (gtk_path_bar_parent_class)->dispose (object);
}
data->button_data->handle = NULL;
+ if (!data->button_data->button)
+ {
+ g_free (data->button_data);
+ goto out;
+ }
+
if (cancelled || error)
goto out;
static void
button_data_free (ButtonData *button_data)
{
+ if (button_data->path)
+ gtk_file_path_free (button_data->path);
+ button_data->path = NULL;
+
+ if (button_data->dir_name)
+ g_free (button_data->dir_name);
+ button_data->dir_name = NULL;
+
+ button_data->button = NULL;
+
if (button_data->handle)
gtk_file_system_cancel_operation (button_data->handle);
-
- gtk_file_path_free (button_data->path);
- g_free (button_data->dir_name);
- g_free (button_data);
+ else
+ g_free (button_data);
}
static const char *