[epiphany] Add NULL-check as the returned item can be NULL



commit ef9a1019e28b10d5d71208f667dc950d50b10868
Author: Benjamin Otte <otte gnome org>
Date:   Fri Aug 7 23:14:19 2009 +0200

    Add NULL-check as the returned item can be NULL

 embed/ephy-web-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 2f6c169..db11f1f 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1110,7 +1110,8 @@ ephy_web_view_copy_back_history (EphyWebView *source,
   /* The ephy/gecko behavior is to add the current item of the source
      embed at the end of the back history, so keep doing that */
   item = webkit_web_back_forward_list_get_current_item (source_bflist);
-  webkit_web_back_forward_list_add_item (dest_bflist, item);
+  if (item)
+    webkit_web_back_forward_list_add_item (dest_bflist, item);
 }
 
 void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]