Don't hang forever in get_pins( ).
Don't SEGFAULT when ok==false.