shared: add NULL callback check in one more place
Follow-up for 9f65637308.
(cherry picked from commit d3d53e5cd143bf96d1eb0e254f16fa8d458d38ce)
Related: #1830861
patch_name: 0423-shared-add-NULL-callback-check-in-one-more-place.patch
present_in_specfile: true
location_in_specfile: 423
squash_commits: true