Commit a5ff4bd 1 parent e246459 commit a5ff4bd Copy full SHA for a5ff4bd
File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -3447,4 +3447,6 @@ The following changes to date are:
3447
3447
- Draugr can revive
3448
3448
- Fix: if burning hands or shocking grasp is active, don't activate
3449
3449
whilst using thievery skill
3450
+ - Fix: Draugr trying to read a spellbook and the spellbook is
3451
+ destroyed while reading it
3450
3452
Original file line number Diff line number Diff line change @@ -346,10 +346,18 @@ learn(VOID_ARGS)
346
346
boolean costly = TRUE;
347
347
struct obj * book = context .spbook .book ;
348
348
349
+ if (!book ) {
350
+ context .spbook .delay = 0 ;
351
+ context .spbook .o_id = 0 ;
352
+ return 0 ;
353
+ }
354
+
349
355
/* JDS: lenses give 50% faster reading; 33% smaller read time */
350
356
if (context .spbook .delay && ublindf && ublindf -> otyp == LENSES && rn2 (2 ))
351
357
context .spbook .delay ++ ;
352
- if (Confusion || (Race_if (PM_DRAUGR ) && book -> otyp != SPE_BOOK_OF_THE_DEAD )) { /* became confused while learning */
358
+ if (Confusion
359
+ || (Race_if (PM_DRAUGR ) && book
360
+ && book -> otyp != SPE_BOOK_OF_THE_DEAD )) { /* became confused while learning */
353
361
(void ) confused_book (book );
354
362
context .spbook .book = 0 ; /* no longer studying */
355
363
context .spbook .o_id = 0 ;
You can’t perform that action at this time.
0 commit comments