diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp
index afc6b02748..3405cdd56a 100644
--- a/src/libcamera/software_isp/debayer_egl.cpp
+++ b/src/libcamera/software_isp/debayer_egl.cpp
@@ -680,6 +680,7 @@ void DebayerEGL::stop()
 	if (programId_)
 		glDeleteProgram(programId_);
 
+	egl_.makeCurrent(false);
 	egl_.resetEGLContext();
 }
 
