mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-26 05:29:12 +02:00
* Fixed bug #14890 where if no binary or text Index existed a crash would occur. if fpc > 2.4 is used then fpc needs to be latest too since a bug was found there also that caused the same crash
git-svn-id: trunk@22282 -
This commit is contained in:
parent
29dc7d7e67
commit
7b12360c79
@ -9,7 +9,7 @@ unit chmcontentprovider;
|
|||||||
//{$else}
|
//{$else}
|
||||||
//{$Note Compiling lhelp *without* search support since your fpc version is not new enough}
|
//{$Note Compiling lhelp *without* search support since your fpc version is not new enough}
|
||||||
//{$endif}
|
//{$endif}
|
||||||
{$if (fpc_version=2) and (fpc_release>5) ((fpc_version=2) and (fpc_release=5) and (fpc_patch>0))}
|
{$if (fpc_version=2) and (fpc_release>4)}
|
||||||
{$Note Compiling lhelp *with* binary index and toc support}
|
{$Note Compiling lhelp *with* binary index and toc support}
|
||||||
{$DEFINE CHM_BINARY_INDEX_TOC}
|
{$DEFINE CHM_BINARY_INDEX_TOC}
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -317,6 +317,7 @@ begin
|
|||||||
{$IFDEF CHM_BINARY_INDEX_TOC}
|
{$IFDEF CHM_BINARY_INDEX_TOC}
|
||||||
SM := fChm.GetTOCSitemap;
|
SM := fChm.GetTOCSitemap;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
|
SM := nil;
|
||||||
Stream := TMemoryStream(fchm.GetObject(fChm.TOCFile));
|
Stream := TMemoryStream(fchm.GetObject(fChm.TOCFile));
|
||||||
if Stream <> nil then begin
|
if Stream <> nil then begin
|
||||||
SM := TChmSiteMap.Create(stTOC);
|
SM := TChmSiteMap.Create(stTOC);
|
||||||
@ -345,6 +346,7 @@ begin
|
|||||||
{$IFDEF CHM_BINARY_INDEX_TOC}
|
{$IFDEF CHM_BINARY_INDEX_TOC}
|
||||||
SM := fChm.GetIndexSitemap;
|
SM := fChm.GetIndexSitemap;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
|
SM := nil;
|
||||||
Stream := TMemoryStream(fchm.GetObject(fChm.IndexFile));
|
Stream := TMemoryStream(fchm.GetObject(fChm.IndexFile));
|
||||||
if Stream <> nil then begin
|
if Stream <> nil then begin
|
||||||
SM := TChmSiteMap.Create(stTOC);
|
SM := TChmSiteMap.Create(stTOC);
|
||||||
|
Loading…
Reference in New Issue
Block a user