Fix T69122: Area Join Error on Invalid Cursor Position

Improved error handling of Join Area operator in cased it is passed cursor position that is not valid.

Differential Revision: https://developer.blender.org/D5598

Reviewed by Brecht Van Lommel
This commit is contained in:
2019-08-26 13:39:25 -07:00
parent 378a13483f
commit ce2368cf69
5 changed files with 7 additions and 5 deletions

View File

@@ -3363,7 +3363,9 @@ static int area_join_modal(bContext *C, wmOperator *op, const wmEvent *event)
sAreaJoinData *jd;
if (op->customdata == NULL) {
area_join_init(C, op, NULL, NULL);
if (!area_join_init(C, op, NULL, NULL)) {
return OPERATOR_CANCELLED;
}
}
jd = (sAreaJoinData *)op->customdata;