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:
authorCampbell Barton <ideasman42@gmail.com>2013-02-06 06:48:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-02-06 06:48:03 +0400
commit441c7fb79a83b7d6f9e86cd2a3b0c8eaeec6d07c (patch)
treec36037cb30d34107fde0d2441ac7c3e768a8c9bb /source/blender/editors/space_info
parent6ff014a7fe2621da897c7511fe100ea5ff2af2a9 (diff)
fix for crashes running some operators in background mode and some divide by zero errors.
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r--source/blender/editors/space_info/info_ops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index 663d136fdf2..22668a3de3a 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -266,10 +266,10 @@ static int unpack_item_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
ID *id;
- char idname[BKE_ST_MAXNAME];
+ char idname[MAX_ID_NAME - 2];
int type = RNA_int_get(op->ptr, "id_type");
int method = RNA_enum_get(op->ptr, "method");
-
+
RNA_string_get(op->ptr, "id_name", idname);
id = BKE_libblock_find_name(type, idname);
@@ -319,7 +319,7 @@ void FILE_OT_unpack_item(wmOperatorType *ot)
/* properties */
RNA_def_enum(ot->srna, "method", unpack_item_method_items, PF_USE_LOCAL, "Method", "How to unpack");
RNA_def_string(ot->srna, "id_name", "", BKE_ST_MAXNAME, "ID name", "Name of ID block to unpack");
- RNA_def_int(ot->srna, "id_type", 0, 0, INT_MAX, "ID Type", "Identifier type of ID block", 0, INT_MAX);
+ RNA_def_int(ot->srna, "id_type", ID_IM, 0, INT_MAX, "ID Type", "Identifier type of ID block", 0, INT_MAX);
}