MediaRoster: Don't allow rosters without a BApplication
* The BeBook states that any media_kit app should have BApplication behind. Beware the app don't need to be running, but the object should be present. This is because we use BApplication as a safe exit point to free the memory allocated. * While I was a bit reclutant in doing that, after a developer discussion we agreed this would be the cleaner way to solve this problem without eluding it.
This commit is contained in:
@@ -2302,7 +2302,7 @@ BMediaRoster::Roster(status_t* out_error)
|
|||||||
BAutolock lock(sInitLocker);
|
BAutolock lock(sInitLocker);
|
||||||
|
|
||||||
if (be_app == NULL)
|
if (be_app == NULL)
|
||||||
TRACE("Warning! You should have a valid BApplication.");
|
debugger("Warning! You should have a valid BApplication.");
|
||||||
|
|
||||||
if (!lock.IsLocked())
|
if (!lock.IsLocked())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user