Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Backport r24077 from trunk

git-svn-id: http://svn.mythtv.org/svn/branches/release-0-23-fixes@25187 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information...
commit 91b3528676edde8fe60ed4e17bfbd0f3f3259cab 1 parent 942eb31
@jyavenard jyavenard authored
Showing with 20 additions and 2 deletions.
  1. +20 −2 mythtv/libs/libmythui/util-nvctrl.cpp
View
22 mythtv/libs/libmythui/util-nvctrl.cpp
@@ -107,9 +107,15 @@ int GetNvidiaRates(t_screenrate& screenmap)
/* first, we query the MetaModes on this X screen */
- XNVCTRLQueryBinaryData(dpy, screen, 0, // n/a
+ ret = XNVCTRLQueryBinaryData(dpy, screen, 0, // n/a
NV_CTRL_BINARY_DATA_METAMODES,
(unsigned char **)&pMetaModes, &MetaModeLen);
+ if (!ret)
+ {
+ VERBOSE(VB_PLAYBACK, QString("Unknown error. Failed to query the enabled Display Devices."));
+ delete d;
+ return -1;
+ }
/*
* then, we query the ModeLines for each display device on
@@ -122,9 +128,21 @@ int GetNvidiaRates(t_screenrate& screenmap)
{
if (!(display_devices & mask)) continue;
- XNVCTRLQueryBinaryData(dpy, screen, mask,
+ ret = XNVCTRLQueryBinaryData(dpy, screen, mask,
NV_CTRL_BINARY_DATA_MODELINES,
(unsigned char **)&str, &len);
+ if (!ret)
+ {
+ VERBOSE(VB_PLAYBACK, QString("Unknown error. Failed to query the enabled Display Devices."));
+ // Free Memory currently allocated
+ for (j=0; j < nDisplayDevice; ++j)
+ {
+ free(pModeLines[j]);
+ }
+ delete d;
+ return -1;
+ }
+
pModeLines[nDisplayDevice] = str;
ModeLineLen[nDisplayDevice] = len;
Please sign in to comment.
Something went wrong with that request. Please try again.