| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -51,7 +51,6 @@ public class Client implements Runnable { | |||
| 51 | 51 | ||
| 52 | 52 | Thread thread; | |
| 53 | 53 | Socket socket; | |
| 54 | - String ip; | ||
| 55 | 54 | int port; | |
| 56 | 55 | String host; | |
| 57 | 56 | ||
@@ -274,7 +273,10 @@ public boolean active() { | |||
| 274 | 273 | * @brief Returns the IP address of the machine as a String | |
| 275 | 274 | */ | |
| 276 | 275 | public String ip() { | |
| 277 | - return socket.getInetAddress().getHostAddress(); | ||
| 276 | + if (socket != null){ | ||
| 277 | + return socket.getInetAddress().getHostAddress(); | ||
| 278 | + } | ||
| 279 | + return null; | ||
| 278 | 280 | } | |
| 279 | 281 | ||
| 280 | 282 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments