[Scummvm-git-logs] scummvm master -> ab14c410381b66ebc53e71d29438047e5fa457da
sev-
sev at scummvm.org
Sun Sep 29 17:29:20 CEST 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ab14c41038 GRAPHICS: MACGUI: Added safaguards to border blitting
Commit: ab14c410381b66ebc53e71d29438047e5fa457da
https://github.com/scummvm/scummvm/commit/ab14c410381b66ebc53e71d29438047e5fa457da
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2019-09-29T17:28:50+02:00
Commit Message:
GRAPHICS: MACGUI: Added safaguards to border blitting
Changed paths:
graphics/macgui/macwindowborder.cpp
diff --git a/graphics/macgui/macwindowborder.cpp b/graphics/macgui/macwindowborder.cpp
index a8efdd3..f11fbdd 100644
--- a/graphics/macgui/macwindowborder.cpp
+++ b/graphics/macgui/macwindowborder.cpp
@@ -79,8 +79,17 @@ void MacWindowBorder::blitBorderInto(ManagedSurface &destination, bool active) {
TransparentSurface srf;
NinePatchBitmap *src = active ? _activeBorder : _inactiveBorder;
+ if ((active && !_activeInitialized) || (!active && !_inactiveInitialized)) {
+ warning("Attempt to blit unitialised border");
+ }
+
+ if (destination.w == 0 || destination.h == 0) {
+ warning("Attempt to draw %d x %d window", destination.w, destination.h);
+ return;
+ }
+
srf.create(destination.w, destination.h, destination.format);
- srf.fillRect(Common::Rect(0, 0, srf.w, srf.h), kColorGreen2);
+ srf.fillRect(Common::Rect(srf.w, srf.h), kColorGreen2);
byte palette[kColorCount];
g_system->getPaletteManager()->grabPalette(palette, 0, kColorCount);
More information about the Scummvm-git-logs
mailing list