Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
ba6f6246
Commit
ba6f6246
authored
Mar 27, 2014
by
Carola
Browse files
fix crash selecting items, pressing createFolder and selecting a folder
parent
f3afa27f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Sources/VLCPlaylistViewController.m
View file @
ba6f6246
...
...
@@ -621,8 +621,8 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
if
(
self
.
editing
)
{
if
(
_libraryMode
==
VLCLibraryModeCreateFolder
)
{
_folderObject
=
_foundMedia
[
indexPath
.
item
];
_libraryMode
=
_previousLibraryMode
;
[
self
createFolderWithName
:
nil
];
_libraryMode
=
_previousLibraryMode
;
}
[(
VLCPlaylistCollectionViewCell
*
)[
collectionView
cellForItemAtIndexPath
:
indexPath
]
selectionUpdate
];
return
;
...
...
@@ -806,6 +806,7 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
if
([
folder
.
files
count
]
==
0
)
{
[
self
removeMediaObject
:
folder
updateDatabase
:
YES
];
[
self
setEditing
:
NO
];
[
self
backToAllItems
:
nil
];
}
}
...
...
@@ -854,8 +855,11 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
for
(
NSInteger
i
=
[
_indexPaths
count
]
-
1
;
i
>=
0
;
i
--
)
{
NSIndexPath
*
path
=
_indexPaths
[
i
];
if
(
!
[
_foundMedia
[
path
.
row
]
isKindOfClass
:[
MLFile
class
]])
if
(
_libraryMode
!=
VLCLibraryModeCreateFolder
&&
!
[
_foundMedia
[
path
.
row
]
isKindOfClass
:[
MLFile
class
]])
continue
;
if
(
_libraryMode
==
VLCLibraryModeCreateFolder
)
[
self
updateViewContents
];
MLFile
*
file
=
_foundMedia
[
path
.
row
];
file
.
labels
=
[
NSSet
setWithObjects
:
label
,
nil
];
[
_foundMedia
removeObjectAtIndex
:
path
.
row
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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