Fix: crash in transform.create_orientation on curves without a 3D view
This commit is contained in:
@@ -1220,7 +1220,7 @@ int getTransformOrientation_ex(const Scene *scene,
|
||||
}
|
||||
}
|
||||
else {
|
||||
const bool use_handle = v3d->overlay.handle_display != CURVE_HANDLE_NONE;
|
||||
const bool use_handle = v3d ? (v3d->overlay.handle_display != CURVE_HANDLE_NONE) : true;
|
||||
|
||||
for (nu = static_cast<Nurb *>(nurbs->first); nu; nu = nu->next) {
|
||||
/* Only bezier has a normal. */
|
||||
|
||||
@@ -76,6 +76,8 @@ enum {
|
||||
/**
|
||||
* Calculate unit length values into `r_normal` & `r_plane`
|
||||
* from selected objects in the 3D viewport.
|
||||
*
|
||||
* \param v3d: The 3D viewport or null.
|
||||
*/
|
||||
int getTransformOrientation_ex(const Scene *scene,
|
||||
ViewLayer *view_layer,
|
||||
|
||||
Reference in New Issue
Block a user