diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-10-21 11:19:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-10-21 11:19:04 +0300 |
commit | 34c835cbd10d544088b365a78e5da7cda1f0d6c2 (patch) | |
tree | e7145676c8debf46a4fb336ac8219016e761a1cb /source/blender/editors/sculpt_paint/paint_image_proj.c | |
parent | 41ec25d27bac8c03e8d5e6ebd97c032137d1010e (diff) |
Fix project from view crash before the GPU is initialized
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 5e004c7d675..4c7e5e18257 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -89,6 +89,7 @@ #include "ED_view3d.h" #include "GPU_extensions.h" +#include "GPU_init_exit.h" #include "WM_api.h" #include "WM_types.h" @@ -6137,6 +6138,9 @@ static bool texture_paint_image_from_view_poll(bContext *C) CTX_wm_operator_poll_msg_set(C, "No 3D viewport found to create image from"); return false; } + if (!GPU_is_initialized()) { + return false; + } return true; } |