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>2009-09-10 03:11:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-09-10 03:11:43 +0400
commitaec894939f3cb18c30a01bf97a6512cabcb32a4b (patch)
treee107e898ec5a8b98c62e1323757ff6db8d123c61 /source/blender/editors
parent434af76286152c001d9df0d6da8048fb6da85696 (diff)
- off by 1 error with console command line memory re-allocation.
- documenting vgroups crashed.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_vgroup.c4
-rw-r--r--source/blender/editors/space_console/console_ops.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 6808b10b49d..2b17a6cbe54 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -1230,13 +1230,13 @@ static int set_active_group_exec(bContext *C, wmOperator *op)
static EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *ptr, int *free)
{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Object *ob;
EnumPropertyItem tmp = {0, "", 0, "", ""};
EnumPropertyItem *item= NULL;
bDeformGroup *def;
int a, totitem= 0;
- if(!C) /* needed for docs */
+ if(!C || !(ob = CTX_data_pointer_get_type(C, "object", &RNA_Object).data)) /* needed for docs */
return vgroup_items;
for(a=0, def=ob->defbase.first; def; def=def->next, a++) {
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index 3d0d284b501..2120b97becf 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -190,7 +190,7 @@ ConsoleLine *console_history_verify(const bContext *C)
static void console_line_verify_length(ConsoleLine *ci, int len)
{
/* resize the buffer if needed */
- if(len > ci->len_alloc) {
+ if(len >= ci->len_alloc) {
int new_len= len * 2; /* new length */
char *new_line= MEM_callocN(new_len, "console line");
memcpy(new_line, ci->line, ci->len);