summaryrefslogtreecommitdiff
path: root/maximus/main.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-03-26 16:00:37 +0100
committerPablo Barciela <[email protected]>2019-03-27 05:05:46 +0100
commit25f0f7141eebcb8605ddeb2c70c9a8726984545e (patch)
treee62f8d14d90746549c5cb145552575d1c74a3a19 /maximus/main.c
parent2fa523f484fd27170e18a8fdf46064b2ab7e716a (diff)
downloadmate-netbook-25f0f7141eebcb8605ddeb2c70c9a8726984545e.tar.bz2
mate-netbook-25f0f7141eebcb8605ddeb2c70c9a8726984545e.tar.xz
maximus: Fix 'Segmentation fault'
Fixes https://github.com/mate-desktop/mate-netbook/issues/46
Diffstat (limited to 'maximus/main.c')
-rw-r--r--maximus/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/maximus/main.c b/maximus/main.c
index 267cc0a..a508367 100644
--- a/maximus/main.c
+++ b/maximus/main.c
@@ -64,7 +64,7 @@ gint main (gint argc, gchar *argv[])
MaximusApp UNUSED_VARIABLE *app;
GOptionContext *context;
GError *error = NULL;
- GdkDisplay *gdk_display = gdk_display_get_default ();
+ GdkDisplay *gdk_display;
g_set_application_name ("Maximus");
@@ -90,6 +90,7 @@ gint main (gint argc, gchar *argv[])
g_option_context_parse (context, &argc, &argv, NULL);
g_option_context_free(context);
+ gdk_display = gdk_display_get_default ();
gdk_x11_display_error_trap_push (gdk_display);
app = maximus_app_get_default ();
gdk_x11_display_error_trap_pop_ignored (gdk_display);