summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objstor.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-03-29 14:54:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2023-03-29 15:29:01 +0000
commit0bd23b624035f0796fb161feadf948fd730b7cf8 (patch)
tree53b0e611fde424752815cb8e2f5f68a16ec6e0d9 /sfx2/source/doc/objstor.cxx
parent20132d64bbd448950bcbd2b0d31504d5025ac6c7 (diff)
crashtesting: xSource seen as empty reference
#17 0x00007f42f14f1662 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #18 0x00007f42ef64c68f in com::sun::star::uno::Reference<com::sun::star::embed::XStorage>::operator-> (this=<optimized out>) at core/include/com/sun/star/uno/Reference.h:385 __PRETTY_FUNCTION__ = {<optimized out> <repeats 151 times>} #19 SfxObjectShell::CopyStoragesOfUnknownMediaType (xSource=..., xTarget=uno::Reference to (OStorage *) 0x561536cddad8, rExceptions=empty uno::Sequence) at core/sfx2/source/doc/objstor.cxx:3566 aSubElementNames = uninitialized uno::SequencePython Exception <class 'TypeError'> 'NoneType' object is not iterable: bResult = true #20 0x00007f42ef65551d in SfxObjectShell::SaveAsChildren (this=this@entry=0x561536dad540, rMedium=...) at core/sfx2/source/doc/objstor.cxx:3328 xStorage = uno::Reference to (OStorage *) 0x561536cddad8 AutoSaveEvent = false lArgs = {<comphelper::SequenceAsHashMap> = {m_aMap = std::__debug::unordered_map with 2 elements = {[{maString = "AutoSaveEvent", mnHashCode = 528032507}] = uno::Any(void), [{maString = "FilterName", mnHashCode = -1339490047}] = uno::Any("string": "draw8")}}, static PROP_ABORTED = {{str = Python Exception <class 'AttributeError'> 'NoneType' object has no attribute 'lazy_string': , more = {refCount = 1073741824, length = 7, buffer = u"Aborted"}}}, static PROP_ASTEMPLATE = <same as static member of an already seen type>, static PROP_COMPONENTDATA = <same as static member of an already seen type>, static PROP_DOCUMENTSERVICE = {{str = "DocumentService", more = {refCount = 1073741824, length = 15, buffer = u"DocumentService"}}}, static PROP_ENCRYPTIONDATA = <same as static member of an already seen type>, static PROP_FILENAME = <same as static member of an already seen type>, static PROP_FILTERNAME = <same as static member of an already seen type>, static PROP_FILTERPROVIDER = <same as static member of an already seen type>, static PROP_FILTEROPTIONS = <same as static member of an already seen type>, static PROP_FRAME = <same as static member of an already seen type>, static PROP_FRAMENAME = <same as static member of an already seen type>, static PROP_HIDDEN = <same as static member of an already seen type>, static PROP_INPUTSTREAM = <same as static member of an already seen type>, static PROP_INTERACTIONHANDLER = <same as static member of an already seen type>, static PROP_AUTHENTICATIONHANDLER = <same as static member of an already seen type>, static PROP_JUMPMARK = <same as static member of an already seen type>, static PROP_MACROEXECUTIONMODE = <same as static member of an already seen type>, static PROP_MEDIATYPE = <same as static member of an already seen type>, static PROP_MINIMIZED = <same as static member of an already seen type>, static PROP_NOAUTOSAVE = <same as static member of an already seen type>, static PROP_OPENNEWVIEW = <same as static member of an already seen type>, static PROP_OUTPUTSTREAM = <same as static member of an already seen type>, static PROP_PASSWORD = <same as static member of an already seen type>, static PROP_POSTDATA = <same as static member of an already seen type>, static PROP_PREVIEW = <same as static member of an already seen type>, static PROP_READONLY = <same as static member of an already seen type>, static PROP_REFERRER = <same as static member of an already seen type>, static PROP_REPLACEABLE = <same as static member of an already seen type>, static PROP_SALVAGEDFILE = <same as static member of an already seen type>, static PROP_SILENT = <same as static member of an already seen type>, static PROP_STATUSINDICATOR = <same as static member of an already seen type>, static PROP_STREAM = <same as static member of an already seen type>, static PROP_STREAMFOROUTPUT = <same as static member of an already seen type>, static PROP_TEMPLATENAME = <same as static member of an already seen type>, static PROP_TITLE = <same as static member of an already seen type>, static PROP_TYPENAME = <same as static member of an already seen type>, static PROP_UCBCONTENT = <same as static member of an already seen type>, static PROP_UPDATEDOCMODE = <same as static member of an already seen type>, static PROP_URL = <same as static member of an already seen type>, static PROP_VERSION = <same as static member of an already seen type>, static PROP_DOCUMENTTITLE = <same as static member of an already seen type>, static PROP_MODEL = <same as static member of an already seen type>, static PROP_VIEWONLY = <same as static member of an already seen type>, static PROP_DOCUMENTBASEURL = <same as static member of an already seen type>, static PROP_SUGGESTEDSAVEASNAME = <same as static member of an already seen type>, static PROP_AUTOSAVEEVENT = <same as static member of an already seen type>} aExceptions = empty uno::Sequence #21 0x00007f42ef6555fd in SfxObjectShell::SaveAs (this=this@entry=0x561536dad540, rMedium=...) at core/sfx2/source/doc/objstor.cxx:160 Change-Id: Ie9bb49a8ebff6d985e93c7738da241ff8d61ff2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149724 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/doc/objstor.cxx')
-rw-r--r--sfx2/source/doc/objstor.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 2cc7c3c932f0..4dee93d1e917 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3558,6 +3558,12 @@ bool SfxObjectShell::CopyStoragesOfUnknownMediaType(const uno::Reference< embed:
const uno::Reference< embed::XStorage >& xTarget,
const uno::Sequence<OUString>& rExceptions)
{
+ if (!xSource.is())
+ {
+ SAL_WARN( "sfx.doc", "SfxObjectShell::GetStorage() failed");
+ return false;
+ }
+
// This method does not commit the target storage and should not do it
bool bResult = true;