diff options
Diffstat (limited to 'graphics/surface.cpp')
-rw-r--r-- | graphics/surface.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/graphics/surface.cpp b/graphics/surface.cpp index b704c7fc9c..f06c24c2cd 100644 --- a/graphics/surface.cpp +++ b/graphics/surface.cpp @@ -185,6 +185,9 @@ void Surface::move(int dx, int dy, int height) { if ((dx == 0 && dy == 0) || height <= 0) return; + if (bytesPerPixel != 1 && bytesPerPixel != 2) + error("Surface::move: bytesPerPixel must be 1 or 2"); + byte *src, *dst; int x, y; |