Ticket 47969 - Fix coverity issue
Description: Fix coverity issue 12948 & 12949 (NULL pointer dereference)
https://fedorahosted.org/389/ticket/47969
Reviewed by: mreynolds
(cherry picked from commit 1553b665bfecbbccd54c439442d9a22c5d35d4a1)
(cherry picked from commit af163d345b4524c121296626cb2e9da26d6d061e)