| 1 |
Author: Thorsten Alteholz <[email protected]> |
| 2 |
Description: void crash if there is nothing to play |
| 3 |
--- rplay.orig/contrib/mailsound/mailsound.c |
| 4 |
+++ rplay/contrib/mailsound/mailsound.c |
| 5 |
@@ -132,8 +132,8 @@ |
| 6 |
{ |
| 7 |
compare(buffer, address, size); |
| 8 |
} |
| 9 |
|
| 10 |
|
| 11 |
+ /* if there is nothing to play, play nothing */ |
| 12 |
+ if (av[1]!=NULL) play_sound(av[1], 0); |
| 13 |
fclose(fl); |
| 14 |
exit(0); |
| 15 |
} |
| 16 |
@@ -189,9 +189,7 @@ |
| 17 |
av[ac++] = token; |
| 18 |
token = strtok(NULL, " \t"); |
| 19 |
} |
| 20 |
|
| 21 |
subject_re = NULL; |
| 22 |
|
| 23 |
parse_args(ac, av, size); |
| 24 |
|
| 25 |
if (subject_re) |