Hint, what do you think the result of this statement
Quote:
wsURL.find(L"://");
would be when you feed it "about:blank"? What would you do with that result?
If you don't know the answer off the top of your head, use the debugger / breakpoint to find out.
-------------------------
Edit based on replies to this solution
-------------------------
You asked
Quote:
Is there a way that I can adjust this code to handle this problem
and I gave you a hint of just where to put that "adjustment". That "Find" would be a good place to look for other things. After all, the reason you have a "Find" in there is to clean up the "HTTP://" which you assume is present in the URL. It is that assumption that is invalid for this case ("about:blank") and that's just the place to check for things that don't match your assumption. Have at it.
PS, the reason your code hangs up or blows up or whatever on "about:blank" is that your assumptions about what the url looks like are false. You can spend a lot of time looking at
where it blew up or you can spend your time productively fixing
why it blew up (the assumptions).
And yes, as the other responder pointed out, you are not checking for errors / null pointer returns from some of these functions and that can often lead to blowing up.