summaryrefslogtreecommitdiff
path: root/beos
diff options
context:
space:
mode:
authorFran├žois Revol <revol@free.fr>2012-11-25 20:26:41 +0100
committerFran├žois Revol <revol@free.fr>2012-11-25 20:26:41 +0100
commit1765212be2689b31fa8b1ce24b28a5f8125380de (patch)
treef3bc780acd47903fa271661c5b6f847dc69ed87f /beos
parenteb454ff9f2389e7aca47b4c753a7225a9e4dae1f (diff)
downloadnetsurf-1765212be2689b31fa8b1ce24b28a5f8125380de.tar.gz
netsurf-1765212be2689b31fa8b1ce24b28a5f8125380de.tar.bz2
beos: Fix replicating with empty URL in archive
We just got to about: when no valid URL is passed.
Diffstat (limited to 'beos')
-rw-r--r--beos/scaffolding.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp
index c83cf959f..bcd9943ba 100644
--- a/beos/scaffolding.cpp
+++ b/beos/scaffolding.cpp
@@ -505,12 +505,13 @@ NSBaseView::Instantiate(BMessage *archive)
if (!validate_instantiation(archive, "NSBaseView"))
return NULL;
const char *url;
- if (archive->FindString("url", &url) < B_OK) {
- return NULL;
+ if (archive->FindString("url", &url) < B_OK
+ || url == NULL || strlen(url) == 0) {
+ url = "about:";
}
struct replicant_thread_info *info = new replicant_thread_info;
- info->url = url;
+ info->url = BString(url);
if (nsbeos_find_app_path(info->app) < B_OK)
return NULL;
info->args[0] = info->app;