diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-19 14:11:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-19 14:11:56 +0300 |
commit | 59bcf6cf4f3655a997d923d969d72b3b5a5d5841 (patch) | |
tree | ce5da7f1520f557b8a70aae118e802b959b312fd /source/blender/windowmanager | |
parent | 530b8bba4274abc75b287492440a79f91d2d75d2 (diff) |
[#20722] Ignore non-existent files from .Blog
from Sergey Sharybin (nazgul)
- added own minor changes.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 6f44ce8934d..f6e5263e483 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -374,11 +374,11 @@ void read_Blog(void) G.recent_files.first = G.recent_files.last = NULL; /* read list of recent opend files from .Blog to memory */ - for (l= lines, num= 0; l && (num<U.recent_files); l= l->next, num++) { + for (l= lines, num= 0; l && (num<U.recent_files); l= l->next) { line = l->link; - if (!BLI_streq(line, "")) { + if (line[0] && BLI_exists(line)) { if (num==0) - strcpy(G.sce, line); + strcpy(G.sce, line); /* note: this seems highly dodgy since the file isnt actually read. please explain. - campbell */ recent = (RecentFile*)MEM_mallocN(sizeof(RecentFile),"RecentFile"); BLI_addtail(&(G.recent_files), recent); @@ -386,6 +386,7 @@ void read_Blog(void) recent->filename[0] = '\0'; strcpy(recent->filename, line); + num++; } } |