[Bf-blender-cvs] [55fd389] master: New filebrowser bookmarks: Some minor fix/optimization from latest coverity report.
Bastien Montagne
noreply at git.blender.org
Wed Feb 18 13:18:31 CET 2015
Commit: 55fd389a70b357fa46fd7fcba6f74d8830dd2051
Author: Bastien Montagne
Date: Wed Feb 18 13:17:41 2015 +0100
Branches: master
https://developer.blender.org/rB55fd389a70b357fa46fd7fcba6f74d8830dd2051
New filebrowser bookmarks: Some minor fix/optimization from latest coverity report.
===================================================================
M source/blender/editors/space_file/file_ops.c
===================================================================
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 9e7adaa..f8d13bb 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;
More information about the Bf-blender-cvs
mailing list