Author: janderwald
Date: Sun Jun 16 09:17:29 2013
New Revision: 59224
URL:
http://svn.reactos.org/svn/reactos?rev=59224&view=rev
Log:
[VIDEOPRT]
- Check if there is a dma adapter
CORE-7181 #comment please retest
Modified:
trunk/reactos/win32ss/drivers/videoprt/dma.c
Modified: trunk/reactos/win32ss/drivers/videoprt/dma.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/videoprt/d…
==============================================================================
--- trunk/reactos/win32ss/drivers/videoprt/dma.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/drivers/videoprt/dma.c [iso-8859-1] Sun Jun 16 09:17:29 2013
@@ -229,8 +229,11 @@
return NULL;
}
- /* sanity check */
- ASSERT(!IsListEmpty(&DeviceExtension->DmaAdapterList));
+ if (IsListEmpty(&DeviceExtension->DmaAdapterList))
+ {
+ /* no adapter available */
+ return NULL;
+ }
/* grab first dma adapter */
VpDmaAdapter =
(PVIP_DMA_ADAPTER)CONTAINING_RECORD(DeviceExtension->DmaAdapterList.Flink,
VIP_DMA_ADAPTER, Entry);
@@ -239,7 +242,6 @@
ASSERT(VpDmaAdapter->HwDeviceExtension == HwDeviceExtension);
ASSERT(VpDmaAdapter->Adapter != NULL);
ASSERT(VpDmaAdapter->MapRegisters != 0);
-
/* allocate common buffer */
Result = VideoPortAllocateCommonBuffer(HwDeviceExtension,
(PVP_DMA_ADAPTER)VpDmaAdapter, DesiredLength, LogicalAddress, CacheEnabled, NULL);