diff options
Diffstat (limited to 'src/mpc-hc/SaveImageDialog.cpp')
-rw-r--r-- | src/mpc-hc/SaveImageDialog.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mpc-hc/SaveImageDialog.cpp b/src/mpc-hc/SaveImageDialog.cpp index db3877b3a..025ca3c2a 100644 --- a/src/mpc-hc/SaveImageDialog.cpp +++ b/src/mpc-hc/SaveImageDialog.cpp @@ -84,14 +84,12 @@ END_MESSAGE_MAP() BOOL CSaveImageDialog::OnFileNameOK()
{
if (SysVersion::IsVistaOrLater()) {
- IFileDialogCustomize* pfdc = GetIFileDialogCustomize();
- WCHAR* result;
-
- pfdc->GetEditBoxText(IDC_EDIT1, &result);
- m_nJpegQuality = _wtoi(result);
- CoTaskMemFree(result);
+ CComPtr<IFileDialogCustomize> pfdc = GetIFileDialogCustomize();
+ CComHeapPtr<WCHAR> result;
- pfdc->Release();
+ if (SUCCEEDED(pfdc->GetEditBoxText(IDC_EDIT1, &result))) {
+ m_nJpegQuality = _wtoi(result);
+ }
} else {
m_nJpegQuality = m_jpegQualitySpin.GetPos32();
}
|