Skip to content

Commit 1e585ea

Browse files
committed
Reintroduce HasCallback check when clearing payload
This check was removed with throttling changes, and may have contributed to the crash.
1 parent 6b66c8b commit 1e585ea

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

generate/templates/templates/struct_content.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ using namespace std;
5252
{% if not field.ignore %}
5353
{% if not field.isEnum %}
5454
{% if field.isCallbackFunction %}
55+
if (this->{{ field.name }}.HasCallback()) {
5556
this->raw->{{ fields|payloadFor field.name }} = NULL;
57+
}
5658
{% endif %}
5759
{% endif %}
5860
{% endif %}

0 commit comments

Comments
 (0)