summaryrefslogtreecommitdiff
path: root/avstream/avscamera/sys/Device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'avstream/avscamera/sys/Device.cpp')
-rw-r--r--avstream/avscamera/sys/Device.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/avstream/avscamera/sys/Device.cpp b/avstream/avscamera/sys/Device.cpp
index 107cdafc..1b5f8090 100644
--- a/avstream/avscamera/sys/Device.cpp
+++ b/avstream/avscamera/sys/Device.cpp
@@ -700,7 +700,7 @@ Return Value:
// Publish our profile here.
uiProfileCount = InitializeDeviceProfiles(fFrontCamera, &pDeviceProfiles);
- if( uiProfileCount > 0 )
+ if( uiProfileCount > 0 && pDeviceProfiles != nullptr)
{
if( NT_SUCCESS(KsInitializeDeviceProfile(FilterFactory)) )
{
@@ -721,6 +721,10 @@ Return Value:
ExFreePool(pDeviceProfiles);
pDeviceProfiles = NULL;
}
+ else
+ {
+ IFFAILED_EXIT(STATUS_INSUFFICIENT_RESOURCES);
+ }
}
// On a real device this object would be constructed whenever the sensor hardware is ready...