[Bf-blender-cvs] [34c835cbd10] blender-v2.81-release: Fix project from view crash before the GPU is initialized

Campbell Barton noreply at git.blender.org
Mon Oct 21 10:19:53 CEST 2019


Commit: 34c835cbd10d544088b365a78e5da7cda1f0d6c2
Author: Campbell Barton
Date:   Mon Oct 21 19:19:04 2019 +1100
Branches: blender-v2.81-release
https://developer.blender.org/rB34c835cbd10d544088b365a78e5da7cda1f0d6c2

Fix project from view crash before the GPU is initialized

===================================================================

M	source/blender/editors/sculpt_paint/paint_image_proj.c

===================================================================

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;
 }



More information about the Bf-blender-cvs mailing list