Check for NULL strings before getting their lengths

Problem reported by Karsten Trulsen

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
4 jobs for master in 8 minutes and 44 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Prep
passed #10260933
check-commits

00:00:36

passed #10260934
container-prep

00:00:12

 
  Build
passed #10260935
build

00:07:38

 
  Deploy
failed #10260936
allowed to fail
check-merge-request

00:00:29

 
Name Stage Failure
failed
check-merge-request Deploy
  File "/usr/local/lib/python3.9/site-packages/gitlab/exceptions.py", line 289, in wrapped_f
raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabGetError: 404: 404 Project Not Found
Uploading artifacts for failed job
Uploading artifacts...
WARNING: results.xml: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: exit code 1