Author: jmb
Date: Sat Apr 7 21:30:39 2007
New Revision: 3243
URL:
http://svn.semichrome.net?rev=3243&view=rev
Log:
1) Fix corruption of history data structure on cloning
2) Only destroy urldb's thumbnail bitmap if it's not the same as the new
one. This needs revisiting at a later date such that the mess
surrounding who owns bitmap objects is sorted (and so that urldb
doesn't need to know about bitmaps)
Modified:
trunk/netsurf/content/urldb.c
trunk/netsurf/desktop/history_core.c
Modified: trunk/netsurf/content/urldb.c
URL:
http://svn.semichrome.net/trunk/netsurf/content/urldb.c?rev=3243&r1=3...
==============================================================================
--- trunk/netsurf/content/urldb.c (original)
+++ trunk/netsurf/content/urldb.c Sat Apr 7 21:30:39 2007
@@ -1067,7 +1067,7 @@
if (!p)
return;
- if (p->thumb)
+ if (p->thumb && p->thumb != bitmap)
bitmap_destroy(p->thumb);
p->thumb = bitmap;
Modified: trunk/netsurf/desktop/history_core.c
URL:
http://svn.semichrome.net/trunk/netsurf/desktop/history_core.c?rev=3243&a...
==============================================================================
--- trunk/netsurf/desktop/history_core.c (original)
+++ trunk/netsurf/desktop/history_core.c Sat Apr 7 21:30:39 2007
@@ -124,7 +124,7 @@
new_history->start = history_clone_entry(new_history,
new_history->start);
if (!history->start) {
- LOG(("Insufficient memory to clone history"));
+ LOG(("Insufficient memory to clone history"));
warn_user("NoMemory", 0);
history_destroy(new_history);
return 0;
@@ -178,7 +178,7 @@
for (child = new_entry->forward; child; child = child->next) {
new_child = history_clone_entry(history, child);
if (new_child)
- new_child->back = entry;
+ new_child->back = new_entry;
if (prev)
prev->next = new_child;
if (new_entry->forward == child)