diff options
Diffstat (limited to 'source/blender/editors/space_console')
-rw-r--r-- | source/blender/editors/space_console/console_ops.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index a2c65bc2b08..43b2c645924 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -658,12 +658,11 @@ static int scrollback_append_exec(bContext *C, wmOperator *op) { SpaceConsole *sc= CTX_wm_space_console(C); ARegion *ar= CTX_wm_region(C); - - ConsoleLine *ci= console_history_verify(C); + ConsoleLine *ci; char *str= RNA_string_get_alloc(op->ptr, "text", NULL, 0); /* own this text in the new line, dont free */ int type= RNA_enum_get(op->ptr, "type"); - + ci= console_scrollback_add_str(sc, str, 1); /* own the string */ ci->type= type; @@ -703,7 +702,6 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot) static int copy_exec(bContext *C, wmOperator *UNUSED(op)) { SpaceConsole *sc= CTX_wm_space_console(C); - int buf_len; DynStr *buf_dyn= BLI_dynstr_new(); char *buf_str; @@ -756,7 +754,7 @@ static int copy_exec(bContext *C, wmOperator *UNUSED(op)) } buf_str= BLI_dynstr_get_cstring(buf_dyn); - buf_len= BLI_dynstr_get_len(buf_dyn); + BLI_dynstr_free(buf_dyn); WM_clipboard_text_set(buf_str, 0); @@ -793,7 +791,6 @@ static int paste_exec(bContext *C, wmOperator *UNUSED(op)) if(buf_str==NULL) return OPERATOR_CANCELLED; - buf_next= buf_str; buf_step= buf_str; while((buf_next=buf_step) && buf_next[0] != '\0') { |