[gnome-builder] code: fix signal emission when reloading buffers
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] code: fix signal emission when reloading buffers
- Date: Fri, 11 Jan 2019 18:54:15 +0000 (UTC)
commit b01dfd88b95da5d8178fe4d852c8d40521e70cc6
Author: Christian Hergert <chergert redhat com>
Date: Fri Jan 11 10:53:08 2019 -0800
code: fix signal emission when reloading buffers
src/libide/code/ide-buffer-manager.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/libide/code/ide-buffer-manager.c b/src/libide/code/ide-buffer-manager.c
index 76a206712..7a9c33206 100644
--- a/src/libide/code/ide-buffer-manager.c
+++ b/src/libide/code/ide-buffer-manager.c
@@ -658,6 +658,8 @@ ide_buffer_manager_load_file_async (IdeBufferManager *self,
ide_task_chain (existing_task, task);
IDE_EXIT;
}
+
+ buffer = g_object_ref (existing);
}
else
{
@@ -674,6 +676,8 @@ ide_buffer_manager_load_file_async (IdeBufferManager *self,
/* We might have listeners tracking new buffers. Apply some rules to
* determine if we need the UI to create a new view for the buffer.
*/
+ g_assert (buffer != NULL);
+ g_assert (IDE_IS_BUFFER (buffer));
create_new_view = !(flags & IDE_BUFFER_OPEN_FLAGS_NO_VIEW) &&
(is_new || (flags & IDE_BUFFER_OPEN_FLAGS_BACKGROUND) == 0);
g_signal_emit (self, signals [LOAD_BUFFER], 0, buffer, create_new_view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]