Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
86816a95
Commit
86816a95
authored
Dec 22, 2014
by
Felix Paul Kühne
Browse files
thumbnail cache: fix another potential runtime exception
parent
435494e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Sources/VLCThumbnailsCache.m
View file @
86816a95
...
...
@@ -196,11 +196,12 @@ static NSCache *_thumbnailCacheMetadata;
}
UIGraphicsBeginImageContext
(
imageSize
);
for
(
NSUInteger
i
=
0
;
i
<
fileNumber
;
i
++
)
{
NSUInteger
iter
=
files
.
count
<
fileNumber
?
files
.
count
:
fileNumber
;
for
(
NSUInteger
i
=
0
;
i
<
iter
;
i
++
)
{
MLFile
*
file
=
[
files
objectAtIndex
:
i
];
clusterThumb
=
[
VLCThumbnailsCache
thumbnailForMediaFile
:
file
];
CGContextRef
context
=
UIGraphicsGetCurrentContext
();
CGFloat
imagePartWidth
=
(
imageSize
.
width
/
fileNumb
er
);
CGFloat
imagePartWidth
=
(
imageSize
.
width
/
it
er
);
//the rect in which the image should be drawn
CGRect
clippingRect
=
CGRectMake
(
imagePartWidth
*
i
,
0
,
imagePartWidth
,
imageSize
.
height
);
CGContextSaveGState
(
context
);
...
...
Write
Preview
Supports
Markdown
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