Fix (unreported) greasepencil crash calling transform_fill from outside

3DView

Operator relies on 3DView, poll for it.

Spotted while looking into T76522.

Reviewers: antoniov

Differential Revision: https://developer.blender.org/D7665
This commit is contained in:
Philipp Oeser 2020-05-08 11:48:02 +02:00
parent acd5f5285e
commit a116912fd6
Notes: blender-bot 2023-02-14 08:06:35 +01:00
Referenced by issue #76522, GPencil: Transform fill and Adjust Last Operation panel do not work
1 changed files with 3 additions and 0 deletions

View File

@ -377,6 +377,9 @@ static int gpencil_transform_fill_exec(bContext *C, wmOperator *op)
static bool gpencil_transform_fill_poll(bContext *C)
{
if (!ED_operator_view3d_active(C)) {
return false;
}
Object *ob = CTX_data_active_object(C);
if ((ob == NULL) || (ob->type != OB_GPENCIL)) {
return false;