Skip to content

Commit f5918a9

Browse files
committed
Merge pull request #113395 from mihe/objectdb-snapshot-crash
Fix crash when capturing ObjectDB snapshot
2 parents ad54cd4 + 4b573fb commit f5918a9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

scene/debugger/scene_debugger.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -817,11 +817,13 @@ void SceneDebuggerObject::_parse_script_properties(Script *p_script, ScriptInsta
817817

818818
HashSet<String> exported_members;
819819

820-
List<PropertyInfo> pinfo;
821-
p_instance->get_property_list(&pinfo);
822-
for (const PropertyInfo &E : pinfo) {
823-
if (E.usage & (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_CATEGORY)) {
824-
exported_members.insert(E.name);
820+
if (p_instance) {
821+
List<PropertyInfo> pinfo;
822+
p_instance->get_property_list(&pinfo);
823+
for (const PropertyInfo &E : pinfo) {
824+
if (E.usage & (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_CATEGORY)) {
825+
exported_members.insert(E.name);
826+
}
825827
}
826828
}
827829

0 commit comments

Comments
 (0)