Make sure icon is initiallized as NULL

This commit is contained in:
Christian Dywan 2008-07-15 17:40:55 +02:00
parent 0c52a484e9
commit 834e69cf64

View file

@ -969,6 +969,7 @@ midori_web_view_get_icon (MidoriWebView* web_view)
#if GLIB_CHECK_VERSION (2, 16, 0) #if GLIB_CHECK_VERSION (2, 16, 0)
parent = g_file_new_for_uri (web_view->uri ? web_view->uri : ""); parent = g_file_new_for_uri (web_view->uri ? web_view->uri : "");
icon = NULL;
do do
{ {
file = parent; file = parent;
@ -987,8 +988,8 @@ midori_web_view_get_icon (MidoriWebView* web_view)
while (!icon && parent); while (!icon && parent);
if (icon && (stream = g_loadable_icon_load (G_LOADABLE_ICON (icon), if (icon && (stream = g_loadable_icon_load (G_LOADABLE_ICON (icon),
GTK_ICON_SIZE_MENU, GTK_ICON_SIZE_MENU,
NULL, NULL, NULL))) NULL, NULL, NULL)))
{ {
pixbuf = gdk_pixbuf_new_from_stream (stream, NULL, NULL); pixbuf = gdk_pixbuf_new_from_stream (stream, NULL, NULL);
g_object_unref (stream); g_object_unref (stream);