[libgda] Meson: Gda Browser build and Fix segfault



commit b181e80c64f2220c90663dc76d31cd5314921681
Author: Daniel Espinosa <esodan gmail com>
Date:   Fri Jul 27 21:24:36 2018 -0500

    Meson: Gda Browser build and Fix segfault

 libgda-ui/meson.build |  3 ++-
 tools/meson.build     |  6 ++++--
 tools/tools-main.c    | 12 +++++++-----
 3 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/libgda-ui/meson.build b/libgda-ui/meson.build
index 2b706aee2..05773d36b 100644
--- a/libgda-ui/meson.build
+++ b/libgda-ui/meson.build
@@ -138,7 +138,8 @@ libgdaui = library('gda-ui-'+project_api_version,
        link_with: [ libgda ],
        link_args: [
                '-export-dynamic'
-               ]
+               ],
+       install: true
        )
 
 libgda_ui_plugins = library('gda-ui-plugins-'+project_package,
diff --git a/tools/meson.build b/tools/meson.build
index f25a82db8..2724ead01 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -136,9 +136,11 @@ executable('gda-browser-'+project_api_version,
        c_args: [
                '-include',
                meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"'
+               '-DROOT_DIR="'+meson.source_root()+'"',
+               '-DIS_BROWSER'
                ],
-       link_args: gda_browser_link_args
+       link_args: gda_browser_link_args,
+       install: true
        )
 
 tsplitter_deps = [
diff --git a/tools/tools-main.c b/tools/tools-main.c
index 58a86d4da..5e532e5ba 100644
--- a/tools/tools-main.c
+++ b/tools/tools-main.c
@@ -569,11 +569,13 @@ command_line (GApplication *application, GApplicationCommandLine *cmdline)
                        t_app_remove_feature (T_APP_TERM_CONSOLE);
 
                /* hack */
-               TConnection *tcnc = T_CONNECTION (t_app_get_all_connections ()->data);
-               gchar *tmp;
-               tmp = g_strdup_printf ("%s", t_connection_get_name (tcnc));
-               t_connection_set_name (tcnc, tmp);
-               g_free (tmp);
+    if (cnclist) {
+                 TConnection *tcnc = T_CONNECTION (cnclist->data);
+                 gchar *tmp;
+                 tmp = g_strdup_printf ("%s", t_connection_get_name (tcnc));
+                 t_connection_set_name (tcnc, tmp);
+                 g_free (tmp);
+    }
        }
 #endif
 


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