Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Weikert <elubie@gmx.net>2009-03-14 16:12:11 +0300
committerAndrea Weikert <elubie@gmx.net>2009-03-14 16:12:11 +0300
commitb907b9fd9b625bacb4500fb21b791bb109e1d10d (patch)
tree9e1b06a9d8137e552f7a0bd04905aba7fbafdf29 /source/blender/editors/space_file/filelist.c
parent2aa71b42266a2b1ad278eba0a343f6008a0d1418 (diff)
2.5 filebrowser
* added filter buttons to header * changed large icon for movie files to match small icon * fixed small stack corruption in interface_draw.c (Matt, check if this is ok) * moved nice display of file size to storage.c, where string is created.
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r--source/blender/editors/space_file/filelist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 2ab43e59e66..2a2aa610f96 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -692,8 +692,10 @@ void filelist_readdir(struct FileList* filelist)
for (i=0; (i < filelist->numfiles); ++i)
{
struct direntry* file = filelist_file(filelist, i);
- int len = UI_GetStringWidth(G.font, file->relname,0)+UI_GetStringWidth(G.font, file->size,0);
- if (len > filelist->maxnamelen) filelist->maxnamelen = len;
+ if (file) {
+ int len = UI_GetStringWidth(G.font, file->relname,0)+UI_GetStringWidth(G.font, file->size,0);
+ if (len > filelist->maxnamelen) filelist->maxnamelen = len;
+ }
}
}