summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libkms++/card.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libkms++/card.cpp b/libkms++/card.cpp
index 30f3abf..23a6840 100644
--- a/libkms++/card.cpp
+++ b/libkms++/card.cpp
@@ -165,7 +165,10 @@ Connector* Card::get_first_connected_connector() const
DrmObject* Card::get_object(uint32_t id) const
{
- return m_obmap.at(id);
+ auto iter = m_obmap.find(id);
+ if (iter != m_obmap.end())
+ return iter->second;
+ return nullptr;
}
const vector<DrmObject*> Card::get_objects() const