Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
a9899eb5
Commit
a9899eb5
authored
Jan 16, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/Framework/VLCMediaList,VLCMediaListAspect: Correct the sanity check for added item.
parent
fb76e3b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
extras/MacOSX/Framework/Sources/VLCMediaList.m
extras/MacOSX/Framework/Sources/VLCMediaList.m
+2
-2
extras/MacOSX/Framework/Sources/VLCMediaListAspect.m
extras/MacOSX/Framework/Sources/VLCMediaListAspect.m
+2
-2
No files found.
extras/MacOSX/Framework/Sources/VLCMediaList.m
View file @
a9899eb5
...
...
@@ -306,8 +306,8 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
int
index
=
[[
args
objectForKey
:
@"index"
]
intValue
];
VLCMedia
*
media
=
[
args
objectForKey
:
@"media"
];
/* Sanity check */
if
(
index
&&
index
>
=
[
cachedMedia
count
]
)
index
=
[
cachedMedia
count
]
-
1
;
if
(
index
&&
index
>
[
cachedMedia
count
]
)
index
=
[
cachedMedia
count
];
[
cachedMedia
insertObject
:
media
atIndex
:
index
];
}
[
self
didChange
:
NSKeyValueChangeInsertion
valuesAtIndexes
:[
NSIndexSet
indexSetWithIndexesInRange
:
range
]
forKey
:
@"media"
];
...
...
extras/MacOSX/Framework/Sources/VLCMediaListAspect.m
View file @
a9899eb5
...
...
@@ -264,8 +264,8 @@ static void HandleMediaListViewItemDeleted( const libvlc_event_t * event, void *
[
node
setMedia
:
media
];
[
node
setChildren
:[
self
childrenAtIndex
:
index
]];
/* Sanity check */
if
(
index
&&
index
>
=
[
cachedNode
count
]
)
index
=
[
cachedNode
count
]
-
1
;
if
(
index
&&
index
>
[
cachedNode
count
]
)
index
=
[
cachedNode
count
];
[
cachedNode
insertObject
:
node
atIndex
:
index
];
}
[
self
didChange
:
NSKeyValueChangeInsertion
valuesAtIndexes
:[
NSIndexSet
indexSetWithIndexesInRange
:
range
]
forKey
:
@"node"
];
...
...
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