Commit 2e7b5cc4 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Don't crash when the GstStructure is null

parent 1e5d6a21
......@@ -23,7 +23,10 @@
QString structureValue(GstStructure* device, const char* key)
return QString::fromUtf8(g_value_get_string(gst_structure_get_value(device, key)));
auto x = gst_structure_get_value(device, key);
if (!x)
return {};
return QString::fromUtf8(g_value_get_string(x));
// for reference, the properties can be listed with:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment