forked from blender/blender
Fix review comments #51
@ -2,6 +2,7 @@
|
|||||||
* Copyright 2011-2022 Blender Foundation */
|
* Copyright 2011-2022 Blender Foundation */
|
||||||
|
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
#include <unicodeobject.h>
|
||||||
|
|
||||||
#include <pxr/imaging/hd/material.h>
|
#include <pxr/imaging/hd/material.h>
|
||||||
#include <pxr/imaging/hd/renderDelegate.h>
|
#include <pxr/imaging/hd/renderDelegate.h>
|
||||||
@ -110,7 +111,7 @@ void MaterialData::export_mtlx()
|
|||||||
|
|
||||||
std::string path;
|
std::string path;
|
||||||
|
|
||||||
if (!PyErr_Occurred()) {
|
if (!PyErr_Occurred() && PyUnicode_Check(result)) {
|
||||||
DagerD marked this conversation as resolved
Outdated
|
|||||||
path = PyUnicode_AsUTF8(result);
|
path = PyUnicode_AsUTF8(result);
|
||||||
Py_DECREF(result);
|
Py_DECREF(result);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user
Move
PyUnicode_Check(result)
into block below