summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/here_view_objects.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/here_view_objects.cpp b/src/here_view_objects.cpp
index fdb0477..9037d3c 100644
--- a/src/here_view_objects.cpp
+++ b/src/here_view_objects.cpp
@@ -534,7 +534,7 @@ bool HereViewObjects::__resizeBitmap(unsigned char **curBmp, int curWidth, int c
if (!curBmp || curWidth <= 0 || curHeight <= 0 || newWidth <= 0 || newHeight <= 0) return false;
if (curWidth == newWidth && curHeight == newHeight) return false;
- unsigned char* newBmp = new unsigned char[newWidth * newHeight * 4];
+ unsigned char *newBmp = (unsigned char*)malloc(newWidth * newHeight * 4);
double scaleWidth = (double)newWidth / (double)curWidth;
double scaleHeight = (double)newHeight / (double)curHeight;
@@ -553,7 +553,7 @@ bool HereViewObjects::__resizeBitmap(unsigned char **curBmp, int curWidth, int c
}
}
- delete [] *curBmp;
+ g_free(*curBmp);
*curBmp = newBmp;
return true;
}