From 6c948b6dfde5d0edd4b1975ff8a4a0f89fd9e2c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Mon, 12 Apr 2010 23:16:01 +0300 Subject: [PATCH] Avoid a call to unsetenv/putenv on Qt4.6 This trick does not work with Qt <= 4.5 unfortunately. --- bin/vlc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/vlc.c b/bin/vlc.c index 9e769b018c..e141b4b431 100644 --- a/bin/vlc.c +++ b/bin/vlc.c @@ -75,6 +75,12 @@ int main( int i_argc, const char *ppsz_argv[] ) * use the alpha channel for the embedded video window. */ putenv( (char *)"XLIB_SKIP_ARGB_VISUALS=1" ); #endif +#ifdef HAVE_SETENV + /* Clear the X.Org startup notification ID. Otherwise the UI might try to + * change the environment while the process is multi-threaded. That could + * crash. Screw you X.Org. Next time write a thread-safe specification. */ + unsetenv ("DESKTOP_STARTUP_ID"); +#endif #ifndef ALLOW_RUN_AS_ROOT if (geteuid () == 0) -- 2.39.2