comparison gtk/dw.c @ 1058:fadb18121c56

Fix issue with using/freeing the wrong variable in GTK2 font chooser.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 02 Jun 2011 21:42:46 +0000
parents 818698b4a0df
children dbaf1b11c301
comparison
equal deleted inserted replaced
1057:0cd0089ee17d 1058:fadb18121c56
2814 * insuring no thread changes this unknowingly. 2814 * insuring no thread changes this unknowingly.
2815 */ 2815 */
2816 if(_dw_font_active) 2816 if(_dw_font_active)
2817 { 2817 {
2818 DW_MUTEX_UNLOCK; 2818 DW_MUTEX_UNLOCK;
2819 if(name) 2819 if(font)
2820 free(name); 2820 free(font);
2821 return NULL; 2821 return NULL;
2822 } 2822 }
2823 fd = (GtkFontSelectionDialog *)gtk_font_selection_dialog_new("Choose font"); 2823 fd = (GtkFontSelectionDialog *)gtk_font_selection_dialog_new("Choose font");
2824 if(name) 2824 if(font)
2825 { 2825 {
2826 gtk_font_selection_dialog_set_font_name(fd, name); 2826 gtk_font_selection_dialog_set_font_name(fd, font);
2827 free(name); 2827 free(font);
2828 } 2828 }
2829 2829
2830 _dw_font_active = 1; 2830 _dw_font_active = 1;
2831 2831
2832 dwwait = dw_dialog_new((void *)fd); 2832 dwwait = dw_dialog_new((void *)fd);