diff options
Diffstat (limited to 'sources/pyside2/PySide2/templates/gui_common.xml')
-rw-r--r-- | sources/pyside2/PySide2/templates/gui_common.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/pyside2/PySide2/templates/gui_common.xml b/sources/pyside2/PySide2/templates/gui_common.xml index a139a5fe9..16116877f 100644 --- a/sources/pyside2/PySide2/templates/gui_common.xml +++ b/sources/pyside2/PySide2/templates/gui_common.xml @@ -80,8 +80,8 @@ </template> <template name="qimage_buffer_constructor"> - auto ptr = reinterpret_cast<uchar*>(Shiboken::Buffer::getPointer(%PYARG_1)); - %0 = new %TYPE(ptr, %ARGS); + auto *ptr = reinterpret_cast<uchar *>(Shiboken::Buffer::copyData(%PYARG_1)); + %0 = new %TYPE(ptr, %ARGS, std::free); </template> <template name="qcolor_repr"> |