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;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs