Cleanup: remove redundant variable

`free_tooltip` is no longer needed.
This commit is contained in:
Germano Cavalcante 2021-10-27 18:11:47 -03:00
parent e4a5fd4298
commit 8f02de3de7
1 changed files with 2 additions and 6 deletions

View File

@ -819,11 +819,9 @@ static void wm_drag_draw_tooltip(bContext *C, wmWindow *win, wmDrag *drag, const
int iconsize = UI_DPI_ICON_SIZE;
int padding = 4 * UI_DPI_FAC;
const char *tooltip = NULL;
bool free_tooltip = false;
char *tooltip = NULL;
if (drag->active_dropbox) {
tooltip = dropbox_tooltip(C, drag, xy, drag->active_dropbox);
free_tooltip = true;
}
if (!tooltip && !drag->disabled_info) {
@ -855,9 +853,7 @@ static void wm_drag_draw_tooltip(bContext *C, wmWindow *win, wmDrag *drag, const
if (tooltip) {
wm_drop_operator_draw(tooltip, x, y);
if (free_tooltip) {
MEM_freeN((void *)tooltip);
}
MEM_freeN(tooltip);
}
else if (drag->disabled_info) {
wm_drop_redalert_draw(drag->disabled_info, x, y);