diff options
Diffstat (limited to 'pjsip-apps/src/samples/playfile.c')
-rw-r--r-- | pjsip-apps/src/samples/playfile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pjsip-apps/src/samples/playfile.c b/pjsip-apps/src/samples/playfile.c index a71ad41a..8c51271f 100644 --- a/pjsip-apps/src/samples/playfile.c +++ b/pjsip-apps/src/samples/playfile.c @@ -172,7 +172,9 @@ int main(int argc, char *argv[]) puts(""); puts("Press <ENTER> to stop playing and quit"); - fgets(tmp, sizeof(tmp), stdin); + if (fgets(tmp, sizeof(tmp), stdin) == NULL) { + puts("EOF while reading stdin, will quit now.."); + } /* Start deinitialization: */ |