UI: Fix seg fault of software update language init

Set only software update language when language is configured.

Change-Id: If3f0e304b95863a30fb7bb69197addf4bad689c7
Reviewed-on: https://code.wireshark.org/review/24414
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Uli Heilmeier 2017-11-14 20:11:09 +01:00 committed by Michael Mann
parent 5d1328c528
commit 88d8fa7440

View File

@ -106,9 +106,9 @@ software_update_init(void) {
win_sparkle_set_update_check_interval(prefs.gui_update_interval);
win_sparkle_set_can_shutdown_callback(software_update_can_shutdown_callback);
win_sparkle_set_shutdown_request_callback(software_update_shutdown_request_callback);
if (strcmp(language, "system") != 0) {
if ((language != NULL) && (strcmp(language, "system") != 0)) {
win_sparkle_set_lang(language);
}
}
win_sparkle_init();
}