Fix crashes due to deletion resources owned by QNetworkAccessManager

#300