diff options
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 3 | ||||
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 07385fd3f9..9ef2025337 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -351,7 +351,8 @@ reg_t kTextSize(EngineState *s, int argc, reg_t *argv) { dest[0] = dest[1] = NULL_REG; if (text.empty() || !dest) { // Empty text - dest[2] = dest[3] = make_reg(0, 0); + if (dest) + dest[2] = dest[3] = make_reg(0, 0); debugC(2, kDebugLevelStrings, "GetTextSize: Empty string"); return s->r_acc; } diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index faf966af92..4ea28ed903 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -1312,7 +1312,7 @@ static void AStar(PathfindingState *s) { } // Check if we are done - if (vertex_min == s->vertex_end) + if (vertex_min == s->vertex_end || !vertex_min) break; // Move vertex from set open to set closed |