[vlc-commits] commit: Avoid a call to unsetenv/putenv on Qt4.6 ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Mon Apr 12 22:16:58 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 12 23:16:01 2010 +0300| [6c948b6dfde5d0edd4b1975ff8a4a0f89fd9e2c9] | committer: Rémi Denis-Courmont
Avoid a call to unsetenv/putenv on Qt4.6
This trick does not work with Qt <= 4.5 unfortunately.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6c948b6dfde5d0edd4b1975ff8a4a0f89fd9e2c9
---
bin/vlc.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/bin/vlc.c b/bin/vlc.c
index 9e769b0..e141b4b 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)
More information about the vlc-commits
mailing list