fix NPE in trac #10538