summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qvg_symbian.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/openvg/qvg_symbian.cpp b/src/openvg/qvg_symbian.cpp
index ef0160c..a9625b2 100644
--- a/src/openvg/qvg_symbian.cpp
+++ b/src/openvg/qvg_symbian.cpp
@@ -228,7 +228,7 @@ void* QVGPixmapData::toNativeType(NativeType type)
sgInfo.iSizeInPixels.SetSize(w, h);
sgInfo.iUsage = ESgUsageBitOpenVgImage | ESgUsageBitOpenVgSurface;
- RSgImage *sgImage = q_check_ptr(new RSgImage());
+ QScopedPointer<RSgImage> sgImage(new RSgImage());
err = sgImage->Create(sgInfo, NULL, NULL);
if (err != KErrNone) {
driver.Close();
@@ -239,7 +239,7 @@ void* QVGPixmapData::toNativeType(NativeType type)
EGLImageKHR eglImage = QEgl::eglCreateImageKHR(QEgl::display(),
EGL_NO_CONTEXT,
EGL_NATIVE_PIXMAP_KHR,
- (EGLClientBuffer)sgImage,
+ (EGLClientBuffer)sgImage.data(),
(EGLint*)KEglImageAttribs);
if (!eglImage || eglGetError() != EGL_SUCCESS) {
sgImage->Close();
@@ -261,13 +261,14 @@ void* QVGPixmapData::toNativeType(NativeType type)
if (vgGetError() != VG_NO_ERROR) {
sgImage->Close();
- sgImage = 0;
+ sgImage.reset();
}
+
// release stuff
vgDestroyImage(dstVgImage);
QEgl::eglDestroyImageKHR(QEgl::display(), eglImage);
driver.Close();
- return reinterpret_cast<void*>(sgImage);
+ return reinterpret_cast<void*>(sgImage.take());
#endif
} else if (type == QPixmapData::FbsBitmap) {
CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap);