comparison gtk3/dw.c @ 1057:0cd0089ee17d

Fix issue with using/freeing the wrong variable in GTK3 font chooser.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 02 Jun 2011 21:40:56 +0000
parents 818698b4a0df
children 2accf180bcfe
comparison
equal deleted inserted replaced
1056:240bd5fb8453 1057:0cd0089ee17d
2651 * insuring no thread changes this unknowingly. 2651 * insuring no thread changes this unknowingly.
2652 */ 2652 */
2653 if(_dw_font_active) 2653 if(_dw_font_active)
2654 { 2654 {
2655 DW_MUTEX_UNLOCK; 2655 DW_MUTEX_UNLOCK;
2656 if(name) 2656 if(font)
2657 free(name); 2657 free(font);
2658 return NULL; 2658 return NULL;
2659 } 2659 }
2660 fd = (GtkFontSelectionDialog *)gtk_font_selection_dialog_new("Choose font"); 2660 fd = (GtkFontSelectionDialog *)gtk_font_selection_dialog_new("Choose font");
2661 if(name) 2661 if(font)
2662 { 2662 {
2663 gtk_font_selection_dialog_set_font_name(fd, name); 2663 gtk_font_selection_dialog_set_font_name(fd, font);
2664 free(name); 2664 free(font);
2665 } 2665 }
2666 2666
2667 _dw_font_active = 1; 2667 _dw_font_active = 1;
2668 2668
2669 dwwait = dw_dialog_new((void *)fd); 2669 dwwait = dw_dialog_new((void *)fd);