diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-31 18:22:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-31 18:22:00 +0400 |
commit | 26da3cb99f5f90e895c599902fa77aecc826a2c3 (patch) | |
tree | 924c5b31c0bbed9bb35f75d531a91236f8d7d396 /source/blender/blenkernel/intern/font.c | |
parent | a98b93be575c5618c0d2c3ae5338b4b3138cd5e3 (diff) |
patch [#23585] Fix for [#23553] in File Selector; Multiple Calls of Selector
from Alexander Kuznetsov (alexk)
bugfix for [#23553] F2 on filebrowser = bug?
from the tracker
--- snip
File Explorer redraws weirdly on second press of F2 if non-default view or file types were selected previously.
This patch prohibits second call of file selector in the same window.
The bug goes much deeper. If file selector is never closed properly (cancel or select), it never gets released. (at
least the handler). If you press F2 or Ctrl-F3 ten times and than "Back to Previous" and repeat all of this
several times Blender will freeze. Also after calling file selector at least two times, on cancellation Blender will
return to full area independently to what state it was before.
---
include small unrelated change to quiet unpack prints when fonts are not found.
Diffstat (limited to 'source/blender/blenkernel/intern/font.c')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 39b74be3d40..c0a60ea6294 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -265,13 +265,11 @@ static PackedFile *get_builtin_packedfile(void) void free_ttfont(void) { struct TmpFont *tf; - - tf= ttfdata.first; - while(tf) { - freePackedFile(tf->pf); + + for(tf= ttfdata.first; tf; tf= tf->next) { + if(tf->pf) freePackedFile(tf->pf); /* NULL when the font file can't be found on disk */ tf->pf= NULL; tf->vfont= NULL; - tf= tf->next; } BLI_freelistN(&ttfdata); } |