# HG changeset patch # User ib # Date 1317226655 0 # Node ID 418e04046d98c813ed9c74c69fb3c4a9a724e873 # Parent 792c1e2414168e17d863eff09ceb5d17306d533d Fix Win32 GUI filename problems. guiInfo.Filename wasn't properly set. It must be allocated and filename must point to it. Reported by Stephen Sheldon, sfsheldo gmail com. diff -r 792c1e241416 -r 418e04046d98 gui/win32/interface.c --- a/gui/win32/interface.c Wed Sep 28 13:53:15 2011 +0000 +++ b/gui/win32/interface.c Wed Sep 28 16:17:35 2011 +0000 @@ -455,7 +455,7 @@ dvd_title = 0; force_fps = 0; if(!mygui->playlist->tracks) return 0; - filename = guiInfo.Filename = mygui->playlist->tracks[mygui->playlist->current]->filename; + setdup(&guiInfo.Filename, mygui->playlist->tracks[mygui->playlist->current]->filename); guiInfo.Track = mygui->playlist->current + 1; if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm"); if(gtkAOExtraStereo) @@ -486,10 +486,7 @@ } #endif } - if(guiInfo.Filename) - filename = strdup(guiInfo.Filename); - else if(filename) - strcpy(guiInfo.Filename, filename); + filename = guiInfo.Filename; break; } case GUI_SET_AUDIO: @@ -741,6 +738,7 @@ { mygui->playlist->current = 0; filename = mygui->playlist->tracks[0]->filename; + uiSetFileName(NULL, filename, STREAMTYPE_FILE); } return result; }