Fix T57890: freestyle rendering crash.

Depsgraph objects are deleted after conversion to Freestyle data structures,
so don't keep a pointer to their name strings.
This commit is contained in:
2019-01-04 17:35:07 +01:00
parent 0d736d6896
commit bd5394f6c0
7 changed files with 28 additions and 33 deletions

View File

@@ -293,7 +293,7 @@ PyDoc_STRVAR(ViewShape_name_doc,
static PyObject *ViewShape_name_get(BPy_ViewShape *self, void *UNUSED(closure))
{
return PyUnicode_FromString(self->vs->getName());
return PyUnicode_FromString(self->vs->getName().c_str());
}
PyDoc_STRVAR(ViewShape_library_path_doc,
@@ -303,10 +303,7 @@ PyDoc_STRVAR(ViewShape_library_path_doc,
static PyObject *ViewShape_library_path_get(BPy_ViewShape *self, void *UNUSED(closure))
{
const char *name = self->vs->getLibraryPath();
if (!name)
Py_RETURN_NONE;
return PyUnicode_FromString(name);
return PyUnicode_FromString(self->vs->getLibraryPath().c_str());
}
PyDoc_STRVAR(ViewShape_id_doc,