Fixed crash at region page

pull/341/head
parent 06b41bfe8a
commit f4a26fabed

@ -265,7 +265,7 @@ void yon_region_init(main_window *widgets){
if (!gtk_switch_get_active(GTK_SWITCH(widgets->RegionSensitiveSwitch))){ if (!gtk_switch_get_active(GTK_SWITCH(widgets->RegionSensitiveSwitch))){
size=0; size=0;
config_str autotimezone = yon_config_load(internet_tomezone_check_command,(int*)&size); config_str autotimezone = yon_config_load(internet_tomezone_check_command,(int*)&size);
if (size&&!yon_char_is_empty(autotimezone[0])){ if (autotimezone&&!yon_char_is_empty(autotimezone[0])){
yon_char_remove_last_symbol(autotimezone[0],'\n'); yon_char_remove_last_symbol(autotimezone[0],'\n');
gtk_entry_set_text(GTK_ENTRY(widgets->RegionEntry),autotimezone[0]); gtk_entry_set_text(GTK_ENTRY(widgets->RegionEntry),autotimezone[0]);
cc_timezone_map_set_timezone(CC_TIMEZONE_MAP(widgets->RegionMapTarget),autotimezone[0]); cc_timezone_map_set_timezone(CC_TIMEZONE_MAP(widgets->RegionMapTarget),autotimezone[0]);

Loading…
Cancel
Save