[anjuta] document-manager: Make use of symbol-db plugin optional



commit 769fb7ec1c1a7d5d919d6fae80982f347b06fdcc
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Sat Jun 22 18:32:51 2013 +0200

    document-manager: Make use of symbol-db plugin optional

 plugins/document-manager/anjuta-bookmarks.c |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/plugins/document-manager/anjuta-bookmarks.c b/plugins/document-manager/anjuta-bookmarks.c
index 2748431..1286877 100644
--- a/plugins/document-manager/anjuta-bookmarks.c
+++ b/plugins/document-manager/anjuta-bookmarks.c
@@ -429,18 +429,22 @@ anjuta_bookmarks_create_query (AnjutaBookmarks* bookmarks)
 {
        AnjutaBookmarksPrivate* priv = BOOKMARKS_GET_PRIVATE(bookmarks);
        IAnjutaSymbolManager* sym_manager;
-       static IAnjutaSymbolField fields[] = {IANJUTA_SYMBOL_FIELD_NAME};
+       IAnjutaSymbolQuery * query_scope = NULL;
        
        sym_manager = anjuta_shell_get_interface (ANJUTA_PLUGIN(priv->docman)->shell,
                                                                                          
IAnjutaSymbolManager, NULL);
-       
-       IAnjutaSymbolQuery * query_scope =
-               ianjuta_symbol_manager_create_query (sym_manager,
-                                                                                        
IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE,
-                                                                                         
IANJUTA_SYMBOL_QUERY_DB_PROJECT,
-                                                                                         NULL);
-       ianjuta_symbol_query_set_fields (query_scope, 1, fields, NULL);
-       
+       if (sym_manager != NULL)
+       {
+               static IAnjutaSymbolField fields[] = {IANJUTA_SYMBOL_FIELD_NAME};
+
+               query_scope =
+                       ianjuta_symbol_manager_create_query (sym_manager,
+                                                            IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE,
+                                                            IANJUTA_SYMBOL_QUERY_DB_PROJECT,
+                                                            NULL);
+               ianjuta_symbol_query_set_fields (query_scope, 1, fields, NULL);
+       }
+
        return query_scope;
 }
 


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