mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-05 11:03:31 +00:00
Merge 934ff507e5
into 9d67bf2662
This commit is contained in:
commit
4044ba819f
|
@ -2929,6 +2929,15 @@ static bool vc_runtime_outdated()
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void obs_invalid_parameter_handler(const wchar_t *, const wchar_t *,
|
||||||
|
const wchar_t *, unsigned int, uintptr_t)
|
||||||
|
{
|
||||||
|
/* In Release builds the parameters are all NULL, but not having a
|
||||||
|
* handler would result in the program being terminated.
|
||||||
|
* By having one that does not abort execution we let the caller handle
|
||||||
|
* the error codes returned by the function that invoked this. */
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
@ -2957,6 +2966,9 @@ int main(int argc, char *argv[])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#ifndef _DEBUG
|
||||||
|
_set_invalid_parameter_handler(obs_invalid_parameter_handler);
|
||||||
|
#endif
|
||||||
// Abort as early as possible if MSVC runtime is outdated
|
// Abort as early as possible if MSVC runtime is outdated
|
||||||
if (vc_runtime_outdated())
|
if (vc_runtime_outdated())
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue