Skip to content

Commit

Permalink
ANother null check
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Jan 11, 2024
1 parent 284b6d5 commit 03750cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,9 @@ init_model_methods <- function(seed = 0, verbose = FALSE, hessian = FALSE, force
}
require_suggested_package("Rcpp")
require_suggested_package("RcppEigen")
if (length(private$model_methods_env_$hpp_code_) == 0 &&
!file.exists(private$model_methods_env_$obj_file_)) {
if (length(private$model_methods_env_$hpp_code_) == 0 && (
is.null(private$model_methods_env_$obj_file_) ||
!file.exists(private$model_methods_env_$obj_file_))) {
stop("Model methods cannot be used with a pre-compiled Stan executable, ",
"the model must be compiled again", call. = FALSE)
}
Expand Down

0 comments on commit 03750cc

Please sign in to comment.