KEMBAR78
NUVIE: Fix Ultima 6 crash on opening spellbook by PushmePullyu · Pull Request #4845 · scummvm/scummvm · GitHub
Skip to content

Conversation

@PushmePullyu
Copy link
Contributor

@PushmePullyu PushmePullyu commented Mar 25, 2023

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

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
@dreammaster
Copy link
Member

Confirmed that this fixes the problem. Kudos. Merging.

@dreammaster dreammaster merged commit 4f7aa8e into scummvm:master Mar 27, 2023
@PushmePullyu PushmePullyu deleted the fix-u6-crash-on-spellbook-gump branch May 16, 2023 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants