| 716 | } |
| 717 | |
| 718 | recompui::ContextId recompui::get_context_from_document(Rml::ElementDocument* document) { |
| 719 | std::lock_guard lock{ context_state.all_contexts_lock }; |
| 720 | auto find_it = context_state.documents_to_contexts.find(document); |
| 721 | if (find_it == context_state.documents_to_contexts.end()) { |
| 722 | return ContextId::null(); |
| 723 | } |
| 724 | return find_it->second; |
| 725 | } |