fix Issue 11965 - Segfault on garbage
Merge pull request #3136 from 9rnsr/fix11965

[REG2.064] Issue 11965 - Segfault on garbage