summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Popup/src/bitmap_funcs.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp
index f88668d7ee..9e941194a1 100644
--- a/plugins/Popup/src/bitmap_funcs.cpp
+++ b/plugins/Popup/src/bitmap_funcs.cpp
@@ -95,17 +95,17 @@ void MyBitmap::makeOpaqueRect(int x1, int y1, int x2, int y2)
void MyBitmap::saveAlpha(int x, int y, int w, int h)
{
- if (bitsSave)
- delete[] bitsSave;
-
- GdiFlush();
-
+ if (x < 0 || y < 0)
+ return;
if (!w) w = width;
if (!h) h = height;
if (!w || !h)
return;
- if (x < 0 || y < 0)
- return;
+
+ if (bitsSave)
+ delete[] bitsSave;
+
+ GdiFlush();
bitsSave = new COLOR32[w*h];
COLOR32 *p1 = bitsSave;