Skip to content

Commit

Permalink
patch-pulse (from ahoka@NetBSD.org):
Browse files Browse the repository at this point in the history
Fix assertion triggered in pulsaudio by returning "unknown" instead
of NULL pointer when guessing application name.

- Use getprogname on NetBSD as it wont return NULL
  • Loading branch information
slouken committed Oct 16, 2009
1 parent 807cef0 commit b931b17
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/audio/pulse/SDL_pulseaudio.c
Expand Up @@ -346,8 +346,8 @@ static void PULSE_CloseAudio(_THIS)
/* Try to get the name of the program */
static char *get_progname(void)
{
char *progname = NULL;
#ifdef __LINUX__
char *progname = NULL;
FILE *fp;
static char temp[BUFSIZ];

Expand All @@ -364,8 +364,12 @@ static char *get_progname(void)
}
fclose(fp);
}
#endif
return(progname);
#elif defined(__NetBSD__)
return getprogname();
#else
return("unknown");
#endif
}

static void stream_drain_complete(pa_stream *s, int success, void *userdata) {
Expand Down

0 comments on commit b931b17

Please sign in to comment.