<div dir="ltr">Doesn't readLine() returning `null` mean this is the EOF and reading should be stopped ?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 18, 2015 at 11:13 AM, Geoffrey Métais <span dir="ltr"><<a href="mailto:git@videolan.org" target="_blank">git@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">vlc-ports/android | branch: master | Geoffrey Métais <<a href="mailto:geoffrey.metais@gmail.com">geoffrey.metais@gmail.com</a>> | Wed Feb 18 10:39:41 2015 +0100| [483f1b419bc2ff90a50ba970d10a9bcf07252c14] | committer: Geoffrey Métais<br>
<br>
Avoid NPE<br>
<br>
CID #1270674<br>
<br>
> <a href="http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=483f1b419bc2ff90a50ba970d10a9bcf07252c14" target="_blank">http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=483f1b419bc2ff90a50ba970d10a9bcf07252c14</a><br>
---<br>
<br>
libvlc/src/org/videolan/libvlc/LibVlcUtil.java | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/libvlc/src/org/videolan/libvlc/LibVlcUtil.java b/libvlc/src/org/videolan/libvlc/LibVlcUtil.java<br>
index ae37868..2e7111c 100644<br>
--- a/libvlc/src/org/videolan/libvlc/LibVlcUtil.java<br>
+++ b/libvlc/src/org/videolan/libvlc/LibVlcUtil.java<br>
@@ -271,7 +271,8 @@ public class LibVlcUtil {<br>
fileReader = new FileReader("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq");<br>
br = new BufferedReader(fileReader);<br>
line = br.readLine();<br>
- frequency = Float.parseFloat(line) / 1000.f; /* Convert to MHz */<br>
+ if (line != null)<br>
+ frequency = Float.parseFloat(line) / 1000.f; /* Convert to MHz */<br>
} catch(IOException ex) {<br>
Log.w(TAG, "Could not find maximum CPU frequency!");<br>
} catch(NumberFormatException e) {<br>
<br>
_______________________________________________<br>
Android mailing list<br>
<a href="mailto:Android@videolan.org">Android@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/android" target="_blank">https://mailman.videolan.org/listinfo/android</a><br>
</blockquote></div><br></div>