fix bug found by coverity
Merge remote-tracking branch 'upstream/master'
bugfix ptrs