Diff

Differences From Artifact [33db21bdfd]:

To Artifact [9b20b616c9]:


  1970   1970    * Terminate a thread
  1971   1971    */
  1972   1972   static void appfs_terminate_interp_and_thread(void *_interp) {
  1973   1973   	Tcl_Interp *interp;
  1974   1974   
  1975   1975   	APPFS_DEBUG("Called: _interp = %p", _interp);
  1976   1976   
  1977         -	if (_interp == NULL) {
         1977  +	if (_interp != NULL) {
         1978  +		interp = _interp;
         1979  +
         1980  +		APPFS_DEBUG("Terminating interpreter due to thread termination");
         1981  +
         1982  +		appfs_call_libtcl(
         1983  +			Tcl_DeleteInterp(interp);
         1984  +		)
         1985  +	} else {
  1978   1986   		APPFS_DEBUG("Terminating thread with no interpreter");
  1979         -
  1980         -		return;
  1981   1987   	}
  1982   1988   
  1983         -	interp = _interp;
  1984         -
  1985         -	APPFS_DEBUG("Terminating interpreter due to thread termination");
  1986         -
  1987         -	appfs_call_libtcl(
  1988         -		Tcl_DeleteInterp(interp);
  1989         -	)
  1990         -
  1991   1989   	appfs_call_libtcl(
  1992   1990   		Tcl_FinalizeThread();
  1993   1991   	)
  1994   1992   
  1995   1993   	return;
  1996   1994   }
  1997   1995