Add some locking to accesing PlaylistItems in these two cases as suggested by
Stephan. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35348 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6a5cf0a1f2
commit
382a4b129a
@ -487,6 +487,7 @@ MainWin::MessageReceived(BMessage* msg)
|
||||
case 8:
|
||||
{
|
||||
if (msg->what == B_GET_PROPERTY) {
|
||||
BAutolock _(fPlaylist);
|
||||
const PlaylistItem* item = fController->Item();
|
||||
if (item == NULL) {
|
||||
result = B_NO_INIT;
|
||||
@ -2024,6 +2025,7 @@ MainWin::_ShowIfNeeded()
|
||||
void
|
||||
MainWin::_SetFileAttributes()
|
||||
{
|
||||
BAutolock locker(fPlaylist);
|
||||
const FilePlaylistItem* item
|
||||
= dynamic_cast<const FilePlaylistItem*>(fController->Item());
|
||||
if (item == NULL)
|
||||
@ -2034,6 +2036,8 @@ MainWin::_SetFileAttributes()
|
||||
if (node.InitCheck())
|
||||
return;
|
||||
|
||||
locker.Unlock();
|
||||
|
||||
// write duration
|
||||
|
||||
attr_info info;
|
||||
|
Loading…
Reference in New Issue
Block a user