[Scummvm-git-logs] scummvm master -> fe9df60c7314a9628ad7229df030f26d38058620

dreammaster noreply at scummvm.org
Mon Mar 27 01:42:43 UTC 2023


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:
fe9df60c73 NUVIE: Fix Ultima 6 crash on look action


Commit: fe9df60c7314a9628ad7229df030f26d38058620
    https://github.com/scummvm/scummvm/commit/fe9df60c7314a9628ad7229df030f26d38058620
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-03-26T18:42:38-07:00

Commit Message:
NUVIE: Fix Ultima 6 crash on look action

Fix a NULL pointer dereference when looking at some objects
which are either invisible or hidden in the darkness.

To reproduce the bug:

1. Go to the Avatars room SW of the throne room.
2. Stand outside the room with the door closed.
3. Use the "look" action on the wall sharing a tile with the bed.

Changed paths:
    engines/ultima/nuvie/core/events.cpp


diff --git a/engines/ultima/nuvie/core/events.cpp b/engines/ultima/nuvie/core/events.cpp
index 3ec732aa2bf..dcc7a00ab66 100644
--- a/engines/ultima/nuvie/core/events.cpp
+++ b/engines/ultima/nuvie/core/events.cpp
@@ -1149,7 +1149,7 @@ bool Events::lookAtCursor(bool delayed, uint16 x, uint16 y, uint8 z, Obj *obj, A
 
 	if (obj && obj->is_on_map() && ((obj->status & OBJ_STATUS_INVISIBLE) || map_window->tile_is_black(x, y, obj))) {
 		Obj *bottom_obj = obj_manager->get_obj(x, y, z, false);
-		if (game->get_game_type() == NUVIE_GAME_U6 && bottom_obj->obj_n == OBJ_U6_SECRET_DOOR // hack for frame 2
+		if (bottom_obj && game->get_game_type() == NUVIE_GAME_U6 && bottom_obj->obj_n == OBJ_U6_SECRET_DOOR // hack for frame 2
 		        && !map_window->tile_is_black(x, y, bottom_obj))
 			obj = bottom_obj;
 		else




More information about the Scummvm-git-logs mailing list