[gnome-builder/gnome-builder-3-20] source-view: short circuit if the buffer has disconnected



commit 9ca97e7cd07058d0a6a18e3ea332b7573bcead8f
Author: Christian Hergert <chergert redhat com>
Date:   Mon May 9 09:45:40 2016 +0300

    source-view: short circuit if the buffer has disconnected
    
    If we have disconnected the buffer, we should just cleanup the async
    operation as soon as possible.

 libide/ide-source-view.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 920b8c0..5c36ba8 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -2596,6 +2596,10 @@ ide_source_view_get_definition_on_mouse_over_cb (GObject      *object,
       IDE_EXIT;
     }
 
+  /* Short circuit if the async operation completed after we closed */
+  if (priv->buffer == NULL)
+    IDE_EXIT;
+
   kind = ide_symbol_get_kind (symbol);
 
   srcloc = ide_symbol_get_definition_location (symbol);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]