bean: fix the OfficeBean SDK example
Regression from 26b4f5be81
(java:use
System.arrayCopy to copy arrays, 2015-06-09), as the old code used to handle
the case when aArguments was null.
How to reproduce:
1) Source the SDK environment.
2) cd instdir/sdk/examples/DevelopersGuide/OfficeBean/
3) make OOoBeanViewer.run
4) Click new document... -> Text Document -> NullPointerException
Change-Id: I5521c7fd200f6c74c5f2665f2e4a99f0d6abfeeb
Reviewed-on: https://gerrit.libreoffice.org/24366
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
This commit is contained in:
@@ -1349,7 +1349,8 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
|
||||
new com.sun.star.beans.PropertyValue[ nNumArgs + 1 ];
|
||||
|
||||
// copy current arguments
|
||||
System.arraycopy(aArguments, 0, aExtendedArguments, 0, nNumArgs);
|
||||
if (aArguments != null)
|
||||
System.arraycopy(aArguments, 0, aExtendedArguments, 0, nNumArgs);
|
||||
|
||||
// add new argument
|
||||
aExtendedArguments[ nNumArgs ] = aArgument;
|
||||
|
Reference in New Issue
Block a user