fix -Wmaybe-uninitialized warning (initialize pointers to NULL)
Merge pull request #2846 from alalek:2.4_fix_python_warnings