Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
09819e28
Commit
09819e28
authored
Feb 18, 2015
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid NPE instead of catching it
parent
6fbe1773
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
vlc-android/src/org/videolan/vlc/util/Util.java
vlc-android/src/org/videolan/vlc/util/Util.java
+10
-7
No files found.
vlc-android/src/org/videolan/vlc/util/Util.java
View file @
09819e28
...
...
@@ -282,12 +282,15 @@ public class Util {
}
public
static
boolean
close
(
Closeable
closeable
)
{
try
{
closeable
.
close
();
return
true
;
}
catch
(
IOException
e
)
{
return
false
;
}
catch
(
NullPointerException
e
)
{
return
false
;}
if
(
closeable
!=
null
)
{
try
{
closeable
.
close
();
return
true
;
}
catch
(
IOException
e
)
{
return
false
;
}
}
else
{
return
false
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment