diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-03 20:05:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-03 20:05:21 +0300 |
commit | 263830f0004481cd4921f03f4242d7c80794b08d (patch) | |
tree | 30b512a06df2e619681ecacf97faee69e46913f8 /source/blender/editors/space_file/file_panels.c | |
parent | 7c86a1a95cbc643fdbbf8c28f0422face8a15a19 (diff) |
Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
Diffstat (limited to 'source/blender/editors/space_file/file_panels.c')
-rw-r--r-- | source/blender/editors/space_file/file_panels.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index 86cd4a967f1..109c5f0fdf6 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -68,7 +68,6 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat uiBut *but; uiLayout *box, *col; struct FSMenu* fsmenu = fsmenu_get(); - char *curdir= (sfile->params)? sfile->params->dir: ""; int i, i_iter, nentries = fsmenu_get_nentries(fsmenu, category); /* reset each time */ @@ -95,8 +94,11 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat entry = fsmenu_get_entry(fsmenu, category, i); /* set this list item as active if we have a match */ - if(strcmp(curdir, entry) == 0) - *nr= i; + if(sfile->params) { + if(strcmp(sfile->params->dir, entry) == 0) { + *nr= i; + } + } /* create nice bookmark name, shows last directory in the full path currently */ BLI_strncpy(temp, entry, FILE_MAX); |