Fix crash from SIGPIPE when disconnected from a server

This commit is contained in:
UnknownShadow200 2019-02-24 09:33:18 +11:00
parent 027677e320
commit 222fe5b983

View File

@ -2153,6 +2153,8 @@ int Platform_ConvertString(void* data, const String* src) {
static void Platform_InitCommon(void) {
signal(SIGCHLD, SIG_IGN);
/* So writing to closed socket doesn't raise SIGPIPE */
signal(SIGPIPE, SIG_IGN);
Platform_InitDisplay();
pthread_mutex_init(&audio_lock, NULL);
}