Changeset 2531 for trunk/jons-gtk-gui

Show
Ignore:
Timestamp:
04/05/01 16:08:54 (8 years ago)
Author:
emojon
Message:

New language codes. 75 is valid according to Mirabilis.

Fix crash when derefencing lang structure on null returns. (when language is not valid)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/jons-gtk-gui/src/user_info_window.cpp

    r2170 r2531  
    394394            const SLanguage *lang = 
    395395                GetLanguageByCode(user->GetLanguage(i)); 
    396             label = 
     396             
     397            label = 
    397398                gtk_label_new( 
    398399                    g_strdup_printf("Language %d:", i + 1)); 
    399             do_entry(iu->lang[i], lang->szName, FALSE); 
     400            if (lang) 
     401              do_entry(iu->lang[i], lang->szName, FALSE); 
     402            else 
     403              do_entry(iu->lang[i], "", false); 
     404 
    400405            gtk_widget_set_usize(iu->lang[i], 75, 20); 
    401406            gtk_box_pack_start(GTK_BOX(h_box), label, FALSE,