[Xfce4-commits] <midori:master> midori_view_save_source needs to handle data == NULL

Christian Dywan noreply at xfce.org
Sun Mar 18 09:34:02 CET 2012


Updating branch refs/heads/master
         to a3d8a5aa94c5643a1aa725bb7ae0f44b16b28511 (commit)
       from ee8824b93be8d2acdd848abc26ffa01a98520379 (commit)

commit a3d8a5aa94c5643a1aa725bb7ae0f44b16b28511
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Mar 18 00:51:43 2012 +0100

    midori_view_save_source needs to handle data == NULL
    
    Fixes: https://bugs.launchpad.net/midori/+bug/957674

 midori/midori-view.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 0a95705..f038ca7 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)
             {


More information about the Xfce4-commits mailing list