Ensure that "str" argument or lwres__print_sprintf() is not NULL

GCC 11 from Fedora 34 fails to build lib/lwres/print.c when
AddressSanitizer is enabled due to the "str" argument being possibly
NULL:

    print.c: In function ‘lwres__print_sprintf’:
    print.c:32:9: error: null destination pointer [-Werror=format-overflow=]
       32 |         vsprintf(str, format, ap);
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~
88 jobs for !5528 with 2458-run-asan-and-tsan-with-latest-stable-gcc-v9_11 in 17 minutes and 29 seconds (queued for 13 seconds)
latest merge request