diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-04-29 12:20:33 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-04-29 12:20:33 +0000 |
commit | e2e10a104fbbed6a21b8f55c71070378300b6aa7 (patch) | |
tree | 33fc23f3362bef66c2a4df492604ea2ae7c0a8b9 /pjsip-apps | |
parent | 2ad45e29734123876cae1ff6e1248f396da997a6 (diff) |
Fixed ticket #241: Crash on Windows when no sound device is available
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/pjproject-0.5-stable@1223 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r-- | pjsip-apps/src/pjsua/main.c | 3 | ||||
-rw-r--r-- | pjsip-apps/src/pjsua/pjsua_app.c | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/pjsip-apps/src/pjsua/main.c b/pjsip-apps/src/pjsua/main.c index f3160092..b7f6af5d 100644 --- a/pjsip-apps/src/pjsua/main.c +++ b/pjsip-apps/src/pjsua/main.c @@ -82,6 +82,9 @@ int main(int argc, char *argv[]) app_main(); app_destroy(); + /* This is on purpose */ + app_destroy(); + return 0; } diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c index 96841c22..e4b51de3 100644 --- a/pjsip-apps/src/pjsua/pjsua_app.c +++ b/pjsip-apps/src/pjsua/pjsua_app.c @@ -95,6 +95,7 @@ static pj_str_t uri_arg; #ifdef STEREO_DEMO static void stereo_demo(); #endif +pj_status_t app_destroy(void); /***************************************************************************** * Configuration manipulation @@ -3155,7 +3156,7 @@ pj_status_t app_init(int argc, char *argv[]) return PJ_SUCCESS; on_error: - pjsua_destroy(); + app_destroy(); return status; } @@ -3167,7 +3168,7 @@ pj_status_t app_main(void) /* Start pjsua */ status = pjsua_start(); if (status != PJ_SUCCESS) { - pjsua_destroy(); + app_destroy(); return status; } |