Skip to content

Commit

Permalink
Fix for issue #1234: Access violation while changing the theme
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmarder committed Jan 20, 2024
1 parent 9ab81e9 commit e8f3263
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 4 deletions.
10 changes: 10 additions & 0 deletions Demos/Advanced/Advanced.dsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xTb3VyY2VcVmlydHVhbFRyZWVzLnBhcw==]
Module=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas
CursorX=42
CursorY=667
TopLine=611
LeftCol=1
Elisions=
Bookmarks=
EditViewName=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas

30 changes: 30 additions & 0 deletions Demos/Interfaces/charityevents.dsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xTb3VyY2VcVmlydHVhbFRyZWVzLnBhcw==]
Module=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas
CursorX=47
CursorY=246
TopLine=223
LeftCol=1
Elisions=
Bookmarks=
EditViewName=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas
[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xEZW1vc1xJbnRlcmZhY2VzXG15ZXZlbnRzLnBh
cw==]
Module=D:\Projects\Virtual-TreeView\Demos\Interfaces\myevents.pas
CursorX=6
CursorY=26
TopLine=13
LeftCol=1
Elisions=
Bookmarks=
EditViewName=D:\Projects\Virtual-TreeView\Demos\Interfaces\myevents.pas

[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xEZW1vc1xPYmplY3RzXE1WQ1BhbmVsLnBhcw==]
Module=D:\Projects\Virtual-TreeView\Demos\Objects\MVCPanel.pas
CursorX=21
CursorY=74
TopLine=52
LeftCol=1
Elisions=
Bookmarks=
EditViewName=D:\Projects\Virtual-TreeView\Demos\Objects\MVCPanel.pas

20 changes: 20 additions & 0 deletions Demos/Minimal/Minimal.dsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xTb3VyY2VcVmlydHVhbFRyZWVzLnBhcw==]
Module=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas
CursorX=42
CursorY=667
TopLine=626
LeftCol=1
Elisions=
Bookmarks=
EditViewName=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas

[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xEZW1vc1xNaW5pbWFsXE1haW4ucGFz]
Module=D:\Projects\Virtual-TreeView\Demos\Minimal\Main.pas
CursorX=1
CursorY=1
TopLine=1
LeftCol=1
Elisions=
Bookmarks=
EditViewName=

10 changes: 10 additions & 0 deletions Demos/OLE/OLE.dsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xEZW1vc1xPTEVcTWFpbi5wYXM=]
Module=D:\Projects\Virtual-TreeView\Demos\OLE\Main.pas
CursorX=1
CursorY=1
TopLine=1
LeftCol=1
Elisions=
Bookmarks=
EditViewName=

10 changes: 10 additions & 0 deletions Demos/Objects/MVCDemo.dsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xTb3VyY2VcVmlydHVhbFRyZWVzLnBhcw==]
Module=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas
CursorX=42
CursorY=667
TopLine=626
LeftCol=1
Elisions=
Bookmarks=
EditViewName=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas

20 changes: 20 additions & 0 deletions Packages/RAD Studio 10.4+/VirtualTreesR.dsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xTb3VyY2VcVmlydHVhbFRyZWVzLnBhcw==]
Module=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas
CursorX=42
CursorY=667
TopLine=626
LeftCol=1
Elisions=
Bookmarks=
EditViewName=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas

[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xEZW1vc1xPYmplY3RzXE1WQ1R5cGVzLnBhcw==]
Module=D:\Projects\Virtual-TreeView\Demos\Objects\MVCTypes.pas
CursorX=36
CursorY=194
TopLine=172
LeftCol=1
Elisions=
Bookmarks=
EditViewName=D:\Projects\Virtual-TreeView\Demos\Objects\MVCTypes.pas

14 changes: 10 additions & 4 deletions Source/VirtualTrees.StyleHooks.pas
Original file line number Diff line number Diff line change
Expand Up @@ -523,10 +523,16 @@ procedure TVclStyleScrollBarsHook.WMCaptureChanged(var Msg: TMessage);

destructor TVclStyleScrollBarsHook.Destroy;
begin
FVertScrollWnd.StyleHook := nil;
FreeAndNil(FVertScrollWnd);
FHorzScrollWnd.StyleHook := nil;
FreeAndNil(FHorzScrollWnd);
if Assigned(FVertScrollWnd) then
begin
FVertScrollWnd.StyleHook := nil;
FreeAndNil(FVertScrollWnd);
end;
if Assigned(FHorzScrollWnd) then
begin
FHorzScrollWnd.StyleHook := nil;
FreeAndNil(FHorzScrollWnd);
end;
inherited;
end;

Expand Down

0 comments on commit e8f3263

Please sign in to comment.