mediasettingsview: avoid segfault if no camera

Change-Id: Ia16e51a39e332a55f1975c36872d7f0d8fbf42d2
parent 3309b97e
......@@ -269,6 +269,10 @@ CppImpl::drawVideoDevices()
}
auto active = 0;
auto current = avModel_->getDefaultDeviceName();
if (current == "") {
// Avoid to draw devices if no camera is selected
return;
}
auto i = 0;
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->combobox_device));
for (const auto& device : avModel_->getDevices()) {
......
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