You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
regex: Add nullptr check in _regex_free, needed with PCRE2 10.42
Fixes #76174.
(cherry picked from commit 290db4a0b6)
This commit is contained in:
@@ -40,8 +40,10 @@ static void *_regex_malloc(PCRE2_SIZE size, void *user) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void _regex_free(void *ptr, void *user) {
|
static void _regex_free(void *ptr, void *user) {
|
||||||
|
if (ptr) {
|
||||||
memfree(ptr);
|
memfree(ptr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int RegExMatch::_find(const Variant &p_name) const {
|
int RegExMatch::_find(const Variant &p_name) const {
|
||||||
if (p_name.is_num()) {
|
if (p_name.is_num()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user