* handle empty stream gracefully (even if gtkhtml doesn't)
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 11 Jul 2006 16:38:55 +0000 (16:38 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 11 Jul 2006 16:38:55 +0000 (16:38 +0000)
pmo-trunk-r362

src/modest-tny-stream-gtkhtml.c

index 6c77c63..6303a0f 100644 (file)
@@ -164,7 +164,7 @@ gtkhtml_write (TnyStreamIface *self, const char *buffer, size_t n)
                return 0;
        }
 
-       if (n == 0)
+       if (n == 0 || !buffer)
                return 0;
                
        gtk_html_stream_write (priv->stream, buffer, n);