summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objstor.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index efe57bd7b2ee..fb80c47c976c 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1332,7 +1332,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
}
// TODO/LATER: error handling
- if( rMedium.GetErrorCode() || pMedium->GetErrorCode() || GetErrorCode() )
+ if( rMedium.GetErrorCode() || !pMedium || pMedium->GetErrorCode() || GetErrorCode() )
return sal_False;
AddLog( OUString( OSL_LOG_PREFIX "Locking" ) );