]> git.lizzy.rs Git - dragonfireclient.git/commit
Fix crash regression when invsize formspec gets used
authorest31 <MTest31@outlook.com>
Fri, 16 Oct 2015 23:01:12 +0000 (01:01 +0200)
committerest31 <MTest31@outlook.com>
Fri, 16 Oct 2015 23:29:05 +0000 (01:29 +0200)
commit836486a98e7b09e25b97c9d989301ed9eb365b3b
tree621e22712a42dacb8573043b706d6a01eac8803c
parentb600bc30a9fbd92800dabad14a38f28f0ccdd28e
Fix crash regression when invsize formspec gets used

The invsize formspec element is outdated. Even though,
it is still supported, only a deprecation warning is shown,
introduced by commit [1]. The lua context passed to the
log_deprecated method added by commit [1] is NULL for the
invsize deprecation warning, as its run on the client and not
the server.

Commit [1] has removed checks for NULL inside the log_deprecated
method, resulting in a crash when a formspec with an invsize
element is parsed. This commit puts the check back.

Fixes #3260.

Referenced commits:

[1]: b5acec0a3c5701c53854ff7afdf4008863e6e8df "Add proper lua api deprecated handling"

[2]: 7b8d372947aae232ddf598155e972bb4dda157a "Use warningstream for deprecated field messages and refactor log_deprecated"
src/script/common/c_internal.cpp