aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/talk.cpp
diff options
context:
space:
mode:
authorStrangerke2011-07-25 16:04:45 +0200
committerStrangerke2011-07-25 16:04:45 +0200
commitcf619196484d7edc11dc6908ab81ebafcb65405f (patch)
treec2225e8cc01d80f7dad7706ebecb0c0a01a00b73 /engines/cge/talk.cpp
parent82adc025ea451f1fce2c0e0eed03d6e48a51e152 (diff)
downloadscummvm-rg350-cf619196484d7edc11dc6908ab81ebafcb65405f.tar.gz
scummvm-rg350-cf619196484d7edc11dc6908ab81ebafcb65405f.tar.bz2
scummvm-rg350-cf619196484d7edc11dc6908ab81ebafcb65405f.zip
CGE: Replace 'no core' checks by asserts
Diffstat (limited to 'engines/cge/talk.cpp')
-rw-r--r--engines/cge/talk.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/cge/talk.cpp b/engines/cge/talk.cpp
index 4e367e3318..4a2df79f24 100644
--- a/engines/cge/talk.cpp
+++ b/engines/cge/talk.cpp
@@ -36,8 +36,7 @@ Font::Font(const char *name) {
_map = (uint8 *) malloc(sizeof(uint8) * kMapSize);
_pos = (uint16 *) malloc(sizeof(uint16) * kPosSize);
_wid = (uint8 *) malloc(sizeof(uint8) * kWidSize);
- if ((_map == NULL) || (_pos == NULL) || (_wid == NULL))
- error("No core");
+ assert((_map != NULL) && (_pos != NULL) && (_wid != NULL));
mergeExt(_path, name, kFontExt);
load();
}
@@ -189,8 +188,7 @@ Bitmap *Talk::box(uint16 w, uint16 h) {
h = 8;
uint16 n = w * h;
b = (uint8 *) malloc(sizeof(uint8) * n);
- if (!b)
- error("No core");
+ assert(b != NULL);
memset(b, kTextColBG, n);
if (_mode) {