summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2006-04-14 23:09:30 +0000
committerAdam Jackson <ajax@nwnk.net>2006-04-14 23:09:30 +0000
commitd017ca616c0b37cd0f697d5786bf57ed94c3cbfb (patch)
tree474680f2088b0a04e16d77793434a05e5174702c
parentaf9d7591ba0ada32bf4c22ee6c845ed85a3e3f03 (diff)
Coverity #1005: Avoid a null deref.
-rw-r--r--ChangeLog5
-rw-r--r--hw/dmx/input/dmxconsole.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 70ee34d6e..6e0a1a985 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2006-04-14 Adam Jackson <ajax@freedesktop.org>
+ * hw/dmx/input/dmxconsole.c:
+ Coverity #1005: Avoid a null deref.
+
+2006-04-14 Adam Jackson <ajax@freedesktop.org>
+
* hw/dmx/input/dmxinputinit.c:
Coverity #1007: Fix a silly null check.
diff --git a/hw/dmx/input/dmxconsole.c b/hw/dmx/input/dmxconsole.c
index 7a313aadd..835909e6c 100644
--- a/hw/dmx/input/dmxconsole.c
+++ b/hw/dmx/input/dmxconsole.c
@@ -696,10 +696,11 @@ static void dmxConsoleComputeWidthHeight(myPrivate *priv,
void dmxConsoleReInit(DevicePtr pDev)
{
GETPRIVFROMPDEV;
- Display *dpy = priv->display;
+ Display *dpy;
if (!priv || !priv->initialized) return;
-
+ dpy = priv->display;
+
dmxConsoleComputeWidthHeight(priv,
&priv->width, &priv->height,
&priv->xScale, &priv->yScale,