summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-02-04 11:45:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-02-04 15:47:13 +0000
commit1fc4cb57755cdfb9ab65c112435997874fb057cd (patch)
treec970286b4821b1121bd39b553f2ebf4a8df1de8f /qadevOOo
parentef2061233d2948e5cdc970277adec2159aae88f8 (diff)
coverity#1326404 Dereference null return value
Change-Id: I1e7605b20716a48bc7a65e76f43fa0061e0d8176
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/helper/OfficeProvider.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java
index 62ac34f528d9..26d0528223e3 100644
--- a/qadevOOo/runner/helper/OfficeProvider.java
+++ b/qadevOOo/runner/helper/OfficeProvider.java
@@ -744,7 +744,8 @@ public class OfficeProvider implements AppProvider
if(f.isDirectory())
{
File files[] = f.listFiles();
- for(int i = 0; i < files.length; i++)
+ int filesLength = files != null ? files.length : 0;
+ for(int i = 0; i < filesLength; ++i)
{
deleteFilesAndDirector(files[i]);
}