[gnome-builder] editor-view: be more defensive against ::destroy
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor-view: be more defensive against ::destroy
- Date: Tue, 14 Nov 2017 23:39:17 +0000 (UTC)
commit ed5000afb94eb69c399f109f5ea23ae1a0f54084
Author: Christian Hergert <chergert redhat com>
Date: Tue Nov 14 15:39:07 2017 -0800
editor-view: be more defensive against ::destroy
We might be in destroy when these code paths hit, so we should try to be
more careful about using the progress bar.
src/libide/editor/ide-editor-view-actions.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/editor/ide-editor-view-actions.c b/src/libide/editor/ide-editor-view-actions.c
index 64c4c10..e76558e 100644
--- a/src/libide/editor/ide-editor-view-actions.c
+++ b/src/libide/editor/ide-editor-view-actions.c
@@ -45,7 +45,8 @@ ide_editor_view_actions_reload_cb (GObject *object,
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (IDE_IS_EDITOR_VIEW (self));
- dzl_gtk_widget_hide_with_fade (GTK_WIDGET (self->progress_bar));
+ if (self->progress_bar != NULL)
+ dzl_gtk_widget_hide_with_fade (GTK_WIDGET (self->progress_bar));
if (!(buffer = ide_buffer_manager_load_file_finish (buffer_manager, result, &error)))
{
@@ -189,7 +190,8 @@ ide_editor_view_actions_save_cb (GObject *object,
ide_layout_view_set_failed (IDE_LAYOUT_VIEW (self), TRUE);
}
- dzl_gtk_widget_hide_with_fade (GTK_WIDGET (self->progress_bar));
+ if (self->progress_bar != NULL)
+ dzl_gtk_widget_hide_with_fade (GTK_WIDGET (self->progress_bar));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]