Skip to content
Snippets Groups Projects
Commit 8aadaf3d authored by Marvin Scholz's avatar Marvin Scholz
Browse files

macosx: move breakpad initialization and allow opt-out

Move the breakpad initialization right to the start of the program
and do not initialize breakpad if the VLC_DISABLE_BREAKPAD env variable
is set.
parent 38ed27f0
No related branches found
No related tags found
No related merge requests found
Pipeline #17875 passed with stage
in 21 minutes and 16 seconds
......@@ -116,6 +116,13 @@ BreakpadRef initBreakpad()
*****************************************************************************/
int main(int i_argc, const char *ppsz_argv[])
{
#ifdef HAVE_BREAKPAD
BreakpadRef breakpad = NULL;
if (!getenv("VLC_DISABLE_BREAKPAD"))
breakpad = initBreakpad();
#endif
/* The so-called POSIX-compliant MacOS X reportedly processes SIGPIPE even
* if it is blocked in all thread.
* Note: this is NOT an excuse for not protecting against SIGPIPE. If
......@@ -279,10 +286,6 @@ int main(int i_argc, const char *ppsz_argv[])
* runloop is used. Otherwise, [NSApp run] needs to be called, which setups more stuff
* before actually starting the loop.
*/
#ifdef HAVE_BREAKPAD
BreakpadRef breakpad;
breakpad = initBreakpad();
#endif
@autoreleasepool {
if(NSApp == nil) {
CFRunLoopRun();
......@@ -302,7 +305,8 @@ out:
libvlc_release(vlc);
#ifdef HAVE_BREAKPAD
BreakpadRelease(breakpad);
if (breakpad)
BreakpadRelease(breakpad);
#endif
return ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment