Fix T56643: crash drag & dropping ID onto a text field.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 6 Sep 2018 15:35:16 +0000 (17:35 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 6 Sep 2018 15:35:16 +0000 (17:35 +0200)
source/blender/editors/interface/interface_handlers.c

index 00828bd0fdf9f7d5f713eab0532eb15ab76d0dde..a0126b0c069569f880e2f69e714d5191fe8a1dcf 100644 (file)
@@ -2017,7 +2017,7 @@ static void ui_but_drop(bContext *C, const wmEvent *event, uiBut *but, uiHandleB
                if (wmd->type == WM_DRAG_ID) {
                        /* align these types with UI_but_active_drop_name */
                        if (ELEM(but->type, UI_BTYPE_TEXT, UI_BTYPE_SEARCH_MENU)) {
-                               ID *id = (ID *)wmd->poin;
+                               ID *id = WM_drag_ID(wmd, 0);
 
                                button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);