summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kms++/src/atomicreq.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/kms++/src/atomicreq.cpp b/kms++/src/atomicreq.cpp
index e01d7c2..1ef4f7d 100644
--- a/kms++/src/atomicreq.cpp
+++ b/kms++/src/atomicreq.cpp
@@ -62,7 +62,12 @@ void AtomicReq::add(DrmPropObject* ob, Property* prop, uint64_t value)
void AtomicReq::add(kms::DrmPropObject* ob, const string& prop, uint64_t value)
{
- add(ob, ob->get_prop(prop), value);
+ Property* p = ob->get_prop(prop);
+
+ if (!p)
+ throw runtime_error("Property not found");
+
+ add(ob, p, value);
}
void AtomicReq::add(kms::DrmPropObject* ob, const map<string, uint64_t>& values)