diff options
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/space_text.c | 14 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 5 |
3 files changed, 6 insertions, 18 deletions
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index af783051661..89e92231657 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -312,10 +312,7 @@ static void text_cursor(wmWindow *win, ScrArea *area, ARegion *region) /* ************* dropboxes ************* */ -static bool text_drop_poll(bContext *UNUSED(C), - wmDrag *drag, - const wmEvent *UNUSED(event), - const char **UNUSED(r_tooltip)) +static bool text_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) { if (drag->type == WM_DRAG_PATH) { /* rule might not work? */ @@ -332,10 +329,7 @@ static void text_drop_copy(wmDrag *drag, wmDropBox *drop) RNA_string_set(drop->ptr, "filepath", drag->path); } -static bool text_drop_paste_poll(bContext *UNUSED(C), - wmDrag *drag, - const wmEvent *UNUSED(event), - const char **UNUSED(r_tooltip)) +static bool text_drop_paste_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) { return (drag->type == WM_DRAG_ID); } @@ -356,8 +350,8 @@ static void text_dropboxes(void) { ListBase *lb = WM_dropboxmap_find("Text", SPACE_TEXT, RGN_TYPE_WINDOW); - WM_dropbox_add(lb, "TEXT_OT_open", text_drop_poll, text_drop_copy, NULL); - WM_dropbox_add(lb, "TEXT_OT_insert", text_drop_paste_poll, text_drop_paste, NULL); + WM_dropbox_add(lb, "TEXT_OT_open", text_drop_poll, text_drop_copy, NULL, NULL); + WM_dropbox_add(lb, "TEXT_OT_insert", text_drop_paste_poll, text_drop_paste, NULL, NULL); } /* ************* end drop *********** */ diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 1d8bc427212..b6ba95885e4 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -686,10 +686,7 @@ static void text_update_drawcache(SpaceText *st, ARegion *region) } } else { - if (drawcache->line_height) { - MEM_freeN(drawcache->line_height); - drawcache->line_height = NULL; - } + MEM_SAFE_FREE(drawcache->line_height); if (full_update || drawcache->update_flag) { nlines = BLI_listbase_count(&txt->lines); diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index b98dae0cd57..2b78ecb245d 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -236,10 +236,7 @@ void text_update_line_edited(TextLine *line) } /* we just free format here, and let it rebuild during draw */ - if (line->format) { - MEM_freeN(line->format); - line->format = NULL; - } + MEM_SAFE_FREE(line->format); } void text_update_edited(Text *text) |