diff options
author | jstebbins <[email protected]> | 2012-05-26 08:07:18 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2012-05-26 08:07:18 +0000 |
commit | c18c9394b6641f183a86aabfe496b41086eb1905 (patch) | |
tree | cda1755e3bc32916b674c8abed737cad171d9274 /gtk/src/audiohandler.c | |
parent | cdcf2526b9b85befc27a29431f71c917b59a6f9d (diff) |
LinGui: fix crash when ejecting dvd
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4699 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/audiohandler.c')
-rw-r--r-- | gtk/src/audiohandler.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index 6e080dd9a..1388cfc60 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -340,11 +340,11 @@ gchar* ghb_get_user_audio_lang(GValue *settings, gint titleindex, gint track) { GValue *audio_list, *asettings; - gchar *lang = NULL; + gchar *lang; audio_list = ghb_settings_get_value(settings, "audio_list"); if (ghb_array_len(audio_list) <= track) - return NULL; + return "und"; asettings = ghb_array_get_nth(audio_list, track); track = ghb_settings_get_int(asettings, "AudioTrack"); lang = ghb_get_source_audio_lang(titleindex, track); @@ -355,7 +355,7 @@ void ghb_set_pref_audio_settings(gint titleindex, GValue *settings) { gint track; - gchar *source_lang = NULL; + gchar *source_lang; hb_audio_config_t *aconfig; GHashTable *track_indices; gint mux; @@ -378,8 +378,10 @@ ghb_set_pref_audio_settings(gint titleindex, GValue *settings) { source_lang = ghb_get_source_audio_lang(titleindex, 0); } - if (source_lang == NULL) + else + { source_lang = ghb_settings_get_string(settings, "PreferredLanguage"); + } pref_audio = ghb_settings_get_value(settings, "AudioList"); |