summaryrefslogtreecommitdiff
path: root/bean
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-04-25 16:10:21 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-04-25 14:56:08 +0000
commite58aa27adf5cc28a8a734263e0e0b6e331b095a9 (patch)
tree592f12c6b61ace7bb0cdbd462bdefd5f4a1e93f4 /bean
parent21f5a2716f35d91fe79c8bf1698b6809bcf31957 (diff)
bean: fix the OfficeBean SDK example
Regression from 26b4f5be815bc7c77deb3d38d23b51c9dea9fcd1 (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>
Diffstat (limited to 'bean')
-rw-r--r--bean/com/sun/star/comp/beans/OOoBean.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/bean/com/sun/star/comp/beans/OOoBean.java b/bean/com/sun/star/comp/beans/OOoBean.java
index 5d79c21492fe..28bde3f10187 100644
--- a/bean/com/sun/star/comp/beans/OOoBean.java
+++ b/bean/com/sun/star/comp/beans/OOoBean.java
@@ -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;