diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-10-31 17:09:06 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-10-31 17:09:06 +0300 |
commit | 0dd98af2559b89149f2b6ae586969c0544c26369 (patch) | |
tree | f227a94ce6796f4900fa3d2f2c9c45bf69689513 | |
parent | bbb4fa7e476ee9b3fb160edf06be1d165f3e3666 (diff) |
Prevent users to be able to override context engine
We expose engine as a string, yet context is dealing with Pointers. To prevent a crash
we may as well just forbid users to override it.
-rw-r--r-- | source/blender/blenkernel/intern/context.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index bc75958ba33..00ad060dd1c 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -949,14 +949,8 @@ ViewRender *CTX_data_view_render(const bContext *C) RenderEngineType *CTX_data_engine(const bContext *C) { - const char *engine_id; - - if (!ctx_data_pointer_verify(C, "engine", (void *)&engine_id)) { - ViewRender *view_render = CTX_data_view_render(C); - engine_id = view_render->engine_id; - } - - return RE_engines_find(engine_id); + ViewRender *view_render = CTX_data_view_render(C); + return RE_engines_find(view_render->engine_id); } /** |