Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc06158a authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Gerrit Code Review
Browse files

Merge "Check for null in LocalSocketImpl.SocketInputStream.available()"

parents ec71fed0 54d50089
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -56,7 +56,10 @@ class LocalSocketImpl
        /** {@inheritDoc} */
        /** {@inheritDoc} */
        @Override
        @Override
        public int available() throws IOException {
        public int available() throws IOException {
            return available_native(fd);
            FileDescriptor myFd = fd;
            if (myFd == null) throw new IOException("socket closed");

            return available_native(myFd);
        }
        }


        /** {@inheritDoc} */
        /** {@inheritDoc} */