diff options
| author | Wei Mao <[email protected]> | 2017-03-20 18:25:57 -0700 |
|---|---|---|
| committer | Wei Mao <[email protected]> | 2017-03-20 18:27:00 -0700 |
| commit | e044ea456aad4c444fbce00a2d9b56b304d59884 (patch) | |
| tree | 4326af385f0666a3af0b7dfae534db68e3e25785 /avstream/avscamera/sys/Device.cpp | |
| parent | bc6e698503f46afbd8fcf62f6d3939147dc49999 (diff) | |
| parent | e4581d8cd1bcc5108786b082a1ec24007a508847 (diff) | |
Merge pull request #118 from saredd/master
Diffstat (limited to 'avstream/avscamera/sys/Device.cpp')
| -rw-r--r-- | avstream/avscamera/sys/Device.cpp | 6 |
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... |
