diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc
index 6911a5e..8de0620 100644
--- a/libs/ardour/session_process.cc
+++ b/libs/ardour/session_process.cc
@@ -1147,7 +1147,8 @@ Session::process_event (SessionEvent* ev)
 framepos_t
 Session::compute_stop_limit () const
 {
-	bool const punching = (config.get_punch_in () && _locations->auto_punch_location());
+	/* Never stop at session end if we are punching */
+	bool const punching = ((config.get_punch_in() || config.get_punch_out()) && _locations->auto_punch_location());
 		
 	if (!actively_recording() && !punching && Config->get_stop_at_session_end()) {
 		return current_end_frame ();
