diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index 7bc1360..c8298ec 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -587,6 +587,8 @@ void MainWindow::processHotplug(HotplugEvent *e)
 		/* Check if the currently-streaming camera is removed. */
 		if (camera == camera_.get()) {
 			toggleCapture(false);
+			camera_->release();
+			camera_.reset();
 			cameraCombo_->setCurrentIndex(0);
 		}
 
