# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1044429097 0 # Node ID a3775f5b877f1dabd45afd7c5990554a36fb9004 # Parent 15810221d4ead44d5b501b9360681b995d7d2f9d Only free current_file when we have a new file selected to show. diff -r 15810221d4ea -r a3775f5b877f dwtest.c --- a/dwtest.c Wed Feb 05 07:00:52 2003 +0000 +++ b/dwtest.c Wed Feb 05 07:11:37 2003 +0000 @@ -137,13 +137,13 @@ int DWSIGNAL browse_callback(HWND window, void *data) { char *tmp; - if ( current_file ) - { - dw_free( current_file ); - } tmp = dw_file_browse("test string", NULL, "c", DW_FILE_OPEN ); if ( tmp ) { + if ( current_file ) + { + dw_free( current_file ); + } current_file = tmp; dw_window_set_text( entryfield, current_file ); read_file();