diff --git a/midori/midori-view.c b/midori/midori-view.c index 0a957055..f038ca7b 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -5232,7 +5232,7 @@ midori_view_save_source (MidoriView* view, { if ((fp = fdopen (fd, "w"))) { - ret = fwrite (data->str, 1, data->len, fp); + ret = fwrite (data ? data->str : "", 1, data ? data->len : 0, fp); fclose (fp); if ((ret - data->len) != 0) {