summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorMichaël Lefèvre <lefevre00@yahoo.fr>2014-04-07 11:44:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-12 11:32:38 +0200
commit70e744b2157ebe48f3a5c839560fedf6521d0464 (patch)
tree4e29618cc5a36f25557bd130226abdfe96e46848 /shell
parentd1516d488c081ec3a5d730d2b1626a0c8dc39a73 (diff)
fdo#43157 Remove OSL_POSTCOND, prefer SAL_WARN_IF
Change-Id: Ia89a2dce799c7ba90bcd19919195bfd2c7a4a180 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/source/win32/shlxthandler/classfactory.cxx6
-rw-r--r--shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx6
2 files changed, 8 insertions, 4 deletions
diff --git a/shell/source/win32/shlxthandler/classfactory.cxx b/shell/source/win32/shlxthandler/classfactory.cxx
index 2c223113be37..d5a394f2904f 100644
--- a/shell/source/win32/shlxthandler/classfactory.cxx
+++ b/shell/source/win32/shlxthandler/classfactory.cxx
@@ -21,6 +21,7 @@
#include <osl/diagnose.h>
+#include <sal/log.hxx>
#include "internal/global.hxx"
#include "classfactory.hxx"
@@ -119,10 +120,11 @@ HRESULT STDMETHODCALLTYPE CClassFactory::CreateInstance(
else if (CLSID_THUMBVIEWER_HANDLER == m_Clsid)
pUnk = static_cast<IExtractImage*>(new CThumbviewer());
- OSL_POSTCOND(pUnk != 0, "Could not create COM object");
-
if (0 == pUnk)
+ {
+ SAL_WARN("shell", "Could not create COM object");
return E_OUTOFMEMORY;
+ }
HRESULT hr = pUnk->QueryInterface(riid, ppvObject);
diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
index 8d25aef23749..10deb738cb44 100644
--- a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
+++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
@@ -32,6 +32,7 @@
#include <propkey.h>
#include <propvarutil.h>
#include <sal/macros.h>
+#include <sal/log.hxx>
#include <malloc.h>
#include <strsafe.h>
@@ -380,10 +381,11 @@ HRESULT STDMETHODCALLTYPE CClassFactory::CreateInstance(
if ( CLSID_PROPERTY_HANDLER == m_Clsid )
pUnk = static_cast<IPropertyStore*>( new CPropertyHdl() );
- OSL_POSTCOND(pUnk != 0, "Could not create COM object");
-
if (0 == pUnk)
+ {
+ SAL_WARN("shell", "Could not create COM object");
return E_OUTOFMEMORY;
+ }
HRESULT hr = pUnk->QueryInterface( riid, ppvObject );