From: RĂ©mi Denis-Courmont Date: Mon, 12 Apr 2010 20:16:01 +0000 (+0300) Subject: Avoid a call to unsetenv/putenv on Qt4.6 X-Git-Tag: 1.1.0-pre1~11 X-Git-Url: https://git.sesse.net/?p=vlc;a=commitdiff_plain;h=6c948b6dfde5d0edd4b1975ff8a4a0f89fd9e2c9 Avoid a call to unsetenv/putenv on Qt4.6 This trick does not work with Qt <= 4.5 unfortunately. --- 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)