3e5a08cefb
Motivation: We should add some more NULL checks to ensure we not SEGV in some cases Modifications: Add more NULL checks Result: More robust implementation