do not assume writable module

This commit is contained in:
Ryan Fleury
2026-06-09 15:01:01 -07:00
parent fde13f52d3
commit e047e84433
+3
View File
@@ -2389,6 +2389,8 @@ d_ctrl_thread__entry_point(void *p)
{ {
String8 path = msg->path; String8 path = msg->path;
D_Entity *module = d_entity_from_handle(msg->entity); D_Entity *module = d_entity_from_handle(msg->entity);
if(module != &d_entity_nil)
{
D_Entity *debug_info_path = d_entity_child_from_kind(module, D_EntityKind_DebugInfoPath); D_Entity *debug_info_path = d_entity_child_from_kind(module, D_EntityKind_DebugInfoPath);
DI_Key old_dbgi_key = di_key_from_path_timestamp(debug_info_path->string, debug_info_path->timestamp); DI_Key old_dbgi_key = di_key_from_path_timestamp(debug_info_path->string, debug_info_path->timestamp);
di_close(old_dbgi_key, 0); di_close(old_dbgi_key, 0);
@@ -2407,6 +2409,7 @@ d_ctrl_thread__entry_point(void *p)
evt->string = path; evt->string = path;
evt->timestamp = new_dbgi_timestamp; evt->timestamp = new_dbgi_timestamp;
d_c2u_push_events(&evts); d_c2u_push_events(&evts);
}
}break; }break;
case D_MsgKind_FreezeThread: case D_MsgKind_FreezeThread:
{ {