Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-iOS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
311
Issues
311
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLC-iOS
Commits
e6f59ee9
Commit
e6f59ee9
authored
Jun 17, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
App Delegate: prevent crash if added media is being removed while it didn't fully arrive
parent
a1200ef7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
AspenProject/VLCAppDelegate.m
AspenProject/VLCAppDelegate.m
+3
-1
No files found.
AspenProject/VLCAppDelegate.m
View file @
e6f59ee9
...
...
@@ -135,6 +135,9 @@
NSNumber
*
prevFetchedSize
=
[
_addedFiles
objectForKey
:
fileURL
];
NSNumber
*
updatedSize
=
[
attribs
objectForKey
:
NSFileSize
];
if
(
!
updatedSize
||
updatedSize
.
intValue
==
0
)
continue
;
if
([
prevFetchedSize
compare
:
updatedSize
]
==
NSOrderedSame
)
{
[
_addedFiles
removeObjectForKey
:
fileURL
];
[[
MLMediaLibrary
sharedMediaLibrary
]
addFilePaths
:@[
fileURL
]];
...
...
@@ -197,7 +200,6 @@
_addMediaTimer
=
[
NSTimer
scheduledTimerWithTimeInterval
:
2
.
target
:
self
selector:
@selector
(
addFileTimerFired
)
userInfo:
nil
repeats
:
YES
];
}
}
...
...
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