summaryrefslogtreecommitdiffstats
path: root/core/m_property.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/m_property.c')
-rw-r--r--core/m_property.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/m_property.c b/core/m_property.c
index 8254218d0c..f7e8d5649f 100644
--- a/core/m_property.c
+++ b/core/m_property.c
@@ -358,6 +358,8 @@ int m_property_strdup_ro(const struct m_option* prop, int action, void* arg,
const char *var)
{
if (action == M_PROPERTY_GET) {
+ if (!var)
+ return M_PROPERTY_UNAVAILABLE;
*(char **)arg = talloc_strdup(NULL, var);
return M_PROPERTY_OK;
}