diff options
author | Johannes Schickel | 2013-08-03 00:58:47 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 02:52:34 +0200 |
commit | 509f96dff3e41fe88e78997f8e1617b0067f85cd (patch) | |
tree | 0408ea8eb3743507af8d987e49954eaa6ffc68e2 /engines/teenagent/font.cpp | |
parent | affb7c3cb3d7a898419fc7ea081824382b2d2d8c (diff) | |
download | scummvm-rg350-509f96dff3e41fe88e78997f8e1617b0067f85cd.tar.gz scummvm-rg350-509f96dff3e41fe88e78997f8e1617b0067f85cd.tar.bz2 scummvm-rg350-509f96dff3e41fe88e78997f8e1617b0067f85cd.zip |
TEENAGENT: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines/teenagent/font.cpp')
-rw-r--r-- | engines/teenagent/font.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/teenagent/font.cpp b/engines/teenagent/font.cpp index 47f52ff90f..efc107f6db 100644 --- a/engines/teenagent/font.cpp +++ b/engines/teenagent/font.cpp @@ -65,7 +65,7 @@ uint Font::render(Graphics::Surface *surface, int x, int y, char c, byte color) byte *glyph = _data + READ_LE_UINT16(_data + idx * 2); int h = glyph[0], w = glyph[1]; - if (surface == NULL || surface->pixels == NULL || y + h <= 0 || y >= kScreenHeight || x + w <= 0 || x >= kScreenWidth) + if (surface == NULL || surface->getBasePtr(0, 0) == NULL || y + h <= 0 || y >= kScreenHeight || x + w <= 0 || x >= kScreenWidth) return w - _widthPack; int i0 = 0, j0 = 0; |