diff options
Diffstat (limited to 'kms++')
-rw-r--r-- | kms++/inc/kms++/drmpropobject.h | 2 | ||||
-rw-r--r-- | kms++/src/drmpropobject.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/kms++/inc/kms++/drmpropobject.h b/kms++/inc/kms++/drmpropobject.h index 809caf5..48e0265 100644 --- a/kms++/inc/kms++/drmpropobject.h +++ b/kms++/inc/kms++/drmpropobject.h @@ -15,6 +15,8 @@ class DrmPropObject : public DrmObject public: void refresh_props(); + bool has_prop(const std::string& name) const { return !!get_prop(name); } + Property* get_prop(const std::string& name) const; uint64_t get_prop_value(uint32_t id) const; diff --git a/kms++/src/drmpropobject.cpp b/kms++/src/drmpropobject.cpp index 74f8848..c78f70a 100644 --- a/kms++/src/drmpropobject.cpp +++ b/kms++/src/drmpropobject.cpp @@ -54,7 +54,7 @@ Property* DrmPropObject::get_prop(const string& name) const return prop; } - throw invalid_argument(string("property ") + name + " not found"); + return nullptr; } uint64_t DrmPropObject::get_prop_value(uint32_t id) const |