Skip to content

Commit

Permalink
Show error should DVD playback not be possible
Browse files Browse the repository at this point in the history
  • Loading branch information
jyavenard committed Jul 7, 2013
1 parent ea6365d commit d0ecc8e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mythtv/programs/mythfrontend/main.cpp
Expand Up @@ -70,6 +70,7 @@ using namespace std;
#include "mythmainwindow.h"
#include "mythcontrols.h"
#include "mythuihelper.h"
#include "mythuinotificationcenter.h"
#include "mythdirs.h"
#include "mythdb.h"
#include "backendconnectionmanager.h"
Expand Down Expand Up @@ -117,6 +118,8 @@ void handleSIGUSR2(void);
static bool gLoaded = false;
#endif

static const QString _Location = QObject::tr("MythFrontend");

namespace
{
class RunSettingsCompletion : public QObject
Expand Down Expand Up @@ -1126,7 +1129,7 @@ static int internal_play_media(const QString &mrl, const QString &plot,
if (pginfo->IsVideoDVD())
{
DVDInfo *dvd = new DVDInfo(pginfo->GetPlaybackURL());
if (dvd && dvd->IsValid())
if (dvd->IsValid())
{
QString name;
QString serialid;
Expand All @@ -1138,8 +1141,9 @@ static int internal_play_media(const QString &mrl, const QString &plot,
}
else
{
if (dvd)
delete dvd;
ShowNotificationError(QObject::tr("DVD Failure"),
_Location, dvd->GetLastError());
delete dvd;
delete pginfo;
return res;
}
Expand Down

0 comments on commit d0ecc8e

Please sign in to comment.