diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-02-18 15:17:41 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-02-18 15:18:04 +0300 |
commit | 55fd389a70b357fa46fd7fcba6f74d8830dd2051 (patch) | |
tree | 0688513f5830b485f41d3c8189cb392e3fb590bc /source/blender/editors/space_file/file_ops.c | |
parent | 2967253ae4f080a4968d6542409c608c1b1fcb41 (diff) |
New filebrowser bookmarks: Some minor fix/optimization from latest coverity report.
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 9e7adaa2de5..f8d13bb6adb 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -646,6 +646,10 @@ static int bookmark_move_exec(bContext *C, wmOperator *op) const int act_index = sfile->bookmarknr; int new_index; + if (totitems < 2) { + return OPERATOR_CANCELLED; + } + switch (direction) { case FILE_BOOKMARK_MOVE_TOP: new_index = 0; |