]> git.tdb.fi Git - libs/net.git/commitdiff
Don't crash on errors without verbose mode
authorMikko Rasa <tdb@tdb.fi>
Mon, 31 Oct 2011 14:33:56 +0000 (16:33 +0200)
committerMikko Rasa <mikko.rasa@movial.com>
Mon, 31 Oct 2011 14:33:56 +0000 (16:33 +0200)
examples/httpget.cpp

index e0c051c946925b91bd7e0984e3d038aaf368bdc8..a4314cef6e3ec12ee83114d36f3e6bd0a823ae71 100644 (file)
@@ -58,7 +58,8 @@ int HttpGet::main()
        else
        {
                const Http::Response *response = client.get_url(url);
-               IO::print(response->get_content());
+               if(response)
+                       IO::print(response->get_content());
        }
 
        return 1;