bugfix: check for NULL before testing isPartiallyFull(stp->blocks)