Skip to content

Commit

Permalink
Merge pull request #731 from knorth55/wait-for-service-args
Browse files Browse the repository at this point in the history
[roseus] check if argv[1] is nil in `wait-for-service`
  • Loading branch information
k-okada committed Jan 26, 2023
2 parents 3ce3325 + c8d478b commit 826371c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roseus/roseus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ pointer ROSEUS_WAIT_FOR_SERVICE(register context *ctx,int n,pointer *argv)

float timeout = -1;

if( n > 1 )
if( n > 1 && argv[1] != NIL)
timeout = ckfltval(argv[1]);

bool bSuccess = service::waitForService(service, ros::Duration(timeout));
Expand Down

0 comments on commit 826371c

Please sign in to comment.