fix Issue 12098 - libcurl bad argument on handle null
Merge pull request #1920 from 9rnsr/fix12098

[REG2.065a] Issue 12098 - libcurl bad argument on handle null