Merge branch 'issue-1802'
Check the pointers before accessing them

based on TortoiseSVN rev. 25128.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Initialize buffers

Signed-off-by: Sven Strickroth <email@cs-ware.de>