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