issue #19379: prevent crash
Merge pull request #130 from shackbarth/19379

issue #19379: prevent crash