|
From: <set...@us...> - 2006-03-27 00:26:31
|
Revision: 1157 Author: sethdill Date: 2006-03-26 16:26:26 -0800 (Sun, 26 Mar 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1157&view=rev Log Message: ----------- Fix for sourceforge bug #1457286. op.xmlToOutline no longer crashes with an assertion failure when the OPML's <head> is an empty element. Also, if <head> is missing entirely then it throws a script error. Modified Paths: -------------- Frontier/trunk/Common/source/opxml.c Modified: Frontier/trunk/Common/source/opxml.c =================================================================== --- Frontier/trunk/Common/source/opxml.c 2006-03-25 19:26:00 UTC (rev 1156) +++ Frontier/trunk/Common/source/opxml.c 2006-03-27 00:26:26 UTC (rev 1157) @@ -331,15 +331,19 @@ disablelangerror (); - flheadfound = opxmlfindtableitem (htopmldocument, STR_head, &hthead); + flheadfound = opxmlheadexists (htopmldocument); /* 2006-03-26 SMD - this used to call opxmlfindtableitem, which was a problem when the head element was empty */ if (flnewoutline && flheadfound) { + + if (opxmlfindtableitem (htopmldocument, STR_head, &hthead)) { - oppushoutline (ho); + oppushoutline (ho); + + opxmlsetwindowatts (hthead, ho, hto, bso, vo); /*set window attributes*/ + + oppopoutline (); + } - opxmlsetwindowatts (hthead, ho, hto, bso, vo); /*set window attributes*/ - - oppopoutline (); } /*if*/ enablelangerror (); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |