aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-12-03 21:41:06 +0000
committerGuy Harris <guy@alum.mit.edu>2007-12-03 21:41:06 +0000
commit835bcbd5e53ccb1cbab8ea10f58aedcab1cd06d1 (patch)
tree2af77759b4505edace1ad59106d8d6a90b0b2546
parentae459b483fddd964efe5d7152f448432019c3942 (diff)
If CoreFoundation create calls fail, fail, don't drive on.
svn path=/trunk/; revision=23716
-rw-r--r--gtk/webbrowser.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/webbrowser.c b/gtk/webbrowser.c
index ff069c98da..9fa7267714 100644
--- a/gtk/webbrowser.c
+++ b/gtk/webbrowser.c
@@ -111,7 +111,13 @@ browser_open_url (const gchar *url)
* CFStringEncodings enum.
*/
url_CFString = CFStringCreateWithCString(NULL, url, kCFStringEncodingASCII);
+ if (url_CFString == NULL)
+ return (FALSE);
url_CFURL = CFURLCreateWithString(NULL, url_CFString, NULL);
+ if (url_CFURL == NULL) {
+ CFRelease(url_CFString);
+ return (FALSE);
+ }
/*
* XXX - this is a Launch Services result code, and we should probably
* display a dialog box if it's not 0, describing what the error was.