- g_signal_connect(d_ptr->wrapperVideoSource, "notify::ready-for-capture",
- G_CALLBACK(QtCamDevicePrivate::on_ready_for_capture_changed), d_ptr);
+ if (d_ptr->wrapperVideoSource) {
+ g_signal_connect(d_ptr->wrapperVideoSource, "notify::ready-for-capture",
+ G_CALLBACK(QtCamDevicePrivate::on_ready_for_capture_changed), d_ptr);
+ }
+ else {
+ g_signal_connect(d_ptr->videoSource, "notify::ready-for-capture",
+ G_CALLBACK(QtCamDevicePrivate::on_ready_for_capture_changed), d_ptr);
+ }