Make sure to have a graphic here
Commit8872f7121b
(crashtesting: crash on exporting kde274105-6.docx to .rtf, 2024-03-27) made sure to provide a graphic in all cases, to avoid crashes revealed by crashtesting. In commitf317746f55
, I removed that. This reinstates the safety measure for cases when there's no graphic yet. Change-Id: Ida3eecd5c7ccff087c2ca8b6076ca01b8a145adc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173697 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
parent
66cf208718
commit
2469e69af8
1 changed files with 4 additions and 0 deletions
|
@ -477,6 +477,10 @@ void EmbeddedObjectRef::GetReplacement( bool bUpdate )
|
|||
return;
|
||||
}
|
||||
|
||||
// Missing graphic can crash
|
||||
if (!mpImpl->oGraphic)
|
||||
mpImpl->oGraphic.emplace();
|
||||
|
||||
std::unique_ptr<SvStream> pGraphicStream(GetGraphicStream( bUpdate ));
|
||||
if (!pGraphicStream && aOldGraphic.IsNone())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue