[MSACM32] Sync with Wine Staging 1.7.55. CORE-10536
[reactos.git] / reactos / dll / win32 / msacm32 / format.c
index cefdded..14bec09 100644 (file)
@@ -660,6 +660,9 @@ MMRESULT WINAPI acmFormatSuggest(HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
     TRACE("(%p, %p, %p, %d, %d)\n",
          had, pwfxSrc, pwfxDst, cbwfxDst, fdwSuggest);
 
+    if (!pwfxSrc || !pwfxDst)
+        return MMSYSERR_INVALPARAM;
+
     if (fdwSuggest & ~(ACM_FORMATSUGGESTF_NCHANNELS|ACM_FORMATSUGGESTF_NSAMPLESPERSEC|
                       ACM_FORMATSUGGESTF_WBITSPERSAMPLE|ACM_FORMATSUGGESTF_WFORMATTAG))
        return MMSYSERR_INVALFLAG;