dmx: Fix null pointer dereference
A null pointer dereference can occur in dmxSync, because TimerForce does not handle a null pointer. dmxSyncTimer is set to NULL a few lines above on a certain condition, which happened on my machine. The explicit NULL check allowed me to start Xdmx again without a segmentation fault. Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
5cdfcdef81
commit
21eda7464d
|
@ -182,7 +182,7 @@ dmxSync(DMXScreenInfo * dmxScreen, Bool now)
|
||||||
|
|
||||||
/* Do sync or set time for later */
|
/* Do sync or set time for later */
|
||||||
if (now || !dmxScreen) {
|
if (now || !dmxScreen) {
|
||||||
if (!TimerForce(dmxSyncTimer))
|
if (dmxSyncTimer == NULL || !TimerForce(dmxSyncTimer))
|
||||||
dmxSyncCallback(NULL, 0, NULL);
|
dmxSyncCallback(NULL, 0, NULL);
|
||||||
/* At this point, dmxSyncPending == 0 because
|
/* At this point, dmxSyncPending == 0 because
|
||||||
* dmxSyncCallback must have been called. */
|
* dmxSyncCallback must have been called. */
|
||||||
|
|
Loading…
Reference in New Issue