Skip to content

Commit

Permalink
allow nullptr to be used as argument to clingo_solve_handle_close
Browse files Browse the repository at this point in the history
  • Loading branch information
rkaminsk committed Mar 7, 2017
1 parent 1c79295 commit aaf3d8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libclingo/src/control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ extern "C" bool clingo_solve_handle_wait(clingo_solve_handle_t *handle, double t
GRINGO_CLINGO_CATCH;
}
extern "C" bool clingo_solve_handle_close(clingo_solve_handle_t *handle) {
GRINGO_CLINGO_TRY { handle->cancel(); }
GRINGO_CLINGO_TRY { if (handle) { handle->cancel(); } }
GRINGO_CLINGO_CATCH;
}
extern "C" bool clingo_solve_handle_model(clingo_solve_handle_t *handle, clingo_model_t **model) {
Expand Down

0 comments on commit aaf3d8f

Please sign in to comment.