Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
124b6190
Commit
124b6190
authored
Jul 03, 1999
by
Alex Priem
Committed by
Alexandre Julliard
Jul 03, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a crash when doing sorted inserts at top level.
parent
60c78f14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
treeview.c
dlls/comctl32/treeview.c
+19
-12
No files found.
dlls/comctl32/treeview.c
View file @
124b6190
...
...
@@ -1266,6 +1266,7 @@ TREEVIEW_GetCount (HWND hwnd, WPARAM wParam, LPARAM lParam)
/***************************************************************************
* This method does the chaining of the insertion of a treeview item
* before an item.
* If parent is NULL, we're inserting at the root of the list.
*/
static
void
TREEVIEW_InsertBefore
(
TREEVIEW_INFO
*
infoPtr
,
...
...
@@ -1280,9 +1281,6 @@ static void TREEVIEW_InsertBefore(
if
(
newItem
==
NULL
)
ERR
(
"NULL newItem, impossible condition
\n
"
);
if
(
parent
==
NULL
)
ERR
(
"NULL parent, impossible condition
\n
"
);
if
(
sibling
!=
NULL
)
/* Insert before this sibling for this parent */
{
/* Store the new item sibling up sibling and sibling tem handle */
...
...
@@ -1304,15 +1302,20 @@ static void TREEVIEW_InsertBefore(
upSibling
->
sibling
=
newItem
->
hItem
;
else
/* this item is the first child of this parent, adjust parent pointers */
parent
->
firstChild
=
newItem
->
hItem
;
if
(
parent
)
parent
->
firstChild
=
newItem
->
hItem
;
else
infoPtr
->
TopRootItem
=
newItem
->
hItem
;
}
else
/* Insert as first child of this parent */
parent
->
firstChild
=
newItem
->
hItem
;
if
(
parent
)
parent
->
firstChild
=
newItem
->
hItem
;
}
/***************************************************************************
* This method does the chaining of the insertion of a treeview item
* after an item.
* If parent is NULL, we're inserting at the root of the list.
*/
static
void
TREEVIEW_InsertAfter
(
TREEVIEW_INFO
*
infoPtr
,
...
...
@@ -1324,12 +1327,10 @@ static void TREEVIEW_InsertAfter(
HTREEITEM
siblingHandle
=
0
;
TREEVIEW_ITEM
*
sibling
=
NULL
;
if
(
newItem
==
NULL
)
ERR
(
"NULL newItem, impossible condition
\n
"
);
if
(
parent
==
NULL
)
ERR
(
"NULL parent, impossible condition
\n
"
);
if
(
upSibling
!=
NULL
)
/* Insert after this upsibling for this parent */
{
/* Store the new item up sibling and sibling item handle */
...
...
@@ -1355,7 +1356,8 @@ static void TREEVIEW_InsertAfter(
*/
}
else
/* Insert as first child of this parent */
parent
->
firstChild
=
newItem
->
hItem
;
if
(
parent
)
parent
->
firstChild
=
newItem
->
hItem
;
}
/***************************************************************************
...
...
@@ -1630,11 +1632,16 @@ TREEVIEW_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
break
;
else
{
TREEVIEW_ITEM
*
aChild
=
&
infoPtr
->
items
[(
INT
)
parentItem
->
firstChild
];
TREEVIEW_ITEM
*
aChild
;
TREEVIEW_ITEM
*
previousChild
=
NULL
;
BOOL
bItemInserted
=
FALSE
;
if
(
parentItem
)
aChild
=
&
infoPtr
->
items
[(
INT
)
parentItem
->
firstChild
];
else
aChild
=
&
infoPtr
->
items
[(
INT
)
infoPtr
->
TopRootItem
];
/* Iterate the parent children to see where we fit in */
while
(
aChild
!=
NULL
)
...
...
@@ -3556,7 +3563,7 @@ TREEVIEW_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
TREEVIEW_VScroll
(
hwnd
,
wParam
,
lParam
);
case
WM_DRAWITEM
:
printf
(
"drawItem
\n
"
);
TRACE
(
"drawItem
\n
"
);
return
DefWindowProcA
(
hwnd
,
uMsg
,
wParam
,
lParam
);
default:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment