My change adjusted set-window-new-pixel so that it rejects attempts to set the new pixel size to a negative value. Here, new-pixel is currently 0, so (set-window-new-pixel window-17 t) is attempting to change new-pixel to be -17. Are negative new-pixel values allowed? If so, the attached patch should fix the problem. If not, the problem's probably in the caller.