[Issue 10317] Potential null-pointer-dereference