[Scummvm-git-logs] scummvm master -> 4f7aa8edb21bc568c39ffbd6c171fd2b580e20c2
dreammaster
noreply at scummvm.org
Mon Mar 27 00:23:19 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:
4f7aa8edb2 NUVIE: Fix Ultima 6 crash on opening spellbook
Commit: 4f7aa8edb21bc568c39ffbd6c171fd2b580e20c2
https://github.com/scummvm/scummvm/commit/4f7aa8edb21bc568c39ffbd6c171fd2b580e20c2
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-03-26T17:23:14-07:00
Commit Message:
NUVIE: Fix Ultima 6 crash on opening spellbook
Fix a NULL pointer dereference when opening the "new style"
spellbook gump.
In an attempt to initialize a new SpellViewGump the code erroneously
called the init() method of the parent class (SpellView). This left
the "font" member variable set to NULL.
To reproduce the bug:
1. Enable "new style" in the video options (requires a restart)
2. Get a spellbook (e.g. from the Avatars room SW of the throne room)
3. Open the inventory by pressing TAB and click the spellbook to ready it
4. Press c to open the spellbook gump
Fixes #12536
Changed paths:
engines/ultima/nuvie/views/spell_view.h
engines/ultima/nuvie/views/spell_view_gump.h
diff --git a/engines/ultima/nuvie/views/spell_view.h b/engines/ultima/nuvie/views/spell_view.h
index 1342c4acffa..f7d6a319aec 100644
--- a/engines/ultima/nuvie/views/spell_view.h
+++ b/engines/ultima/nuvie/views/spell_view.h
@@ -60,7 +60,7 @@ public:
SpellView(Configuration *cfg);
~SpellView() override;
- bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om);
+ virtual bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om);
void set_spell_caster(Actor *actor, Obj *s_container, bool eventMode);
sint16 get_selected_spell() {
diff --git a/engines/ultima/nuvie/views/spell_view_gump.h b/engines/ultima/nuvie/views/spell_view_gump.h
index f33935c5826..89b06bb837c 100644
--- a/engines/ultima/nuvie/views/spell_view_gump.h
+++ b/engines/ultima/nuvie/views/spell_view_gump.h
@@ -49,7 +49,7 @@ public:
SpellViewGump(Configuration *cfg);
~SpellViewGump() override;
- bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om);
+ bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om) override;
void Display(bool full_redraw) override;
More information about the Scummvm-git-logs
mailing list