Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-02-03 07:29:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-02-03 07:29:57 +0300
commit3dc2b009ae8d5238cd2c27faa5aa5fe0cd88a498 (patch)
tree7583e6c9a95c14db785b109ae2eaab6e31f55e8f /source/blender/editors/gpencil
parent5206124ce164529fae98d7bef62afb10e22af516 (diff)
parentd243a0b03a9ff80385a77342a55e2d99cb2eec98 (diff)
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 9b1551fe2a5..4e4ec274a39 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -273,12 +273,10 @@ bGPdata *ED_annotation_data_get_active_direct(ID *screen_id, ScrArea *sa, Scene
bGPdata *ED_gpencil_data_get_active(const bContext *C)
{
Object *ob = CTX_data_active_object(C);
- if (ob == NULL) {
+ if ((ob == NULL) || (ob->type != OB_GPENCIL)) {
return NULL;
}
- bGPdata *gpd = (bGPdata *)ob->data;
-
- return gpd;
+ return ob->data;
}
/* Get the active Grease Pencil datablock