mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
Fix NPE when url for delete game has changed
I think it's only an issue for debug builds where I've manually pointed at a different server, but just in case.
This commit is contained in:
parent
58882fe52f
commit
ceb68b9787
2 changed files with 9 additions and 2 deletions
|
@ -251,7 +251,7 @@ public class NetUtils {
|
||||||
params.put( k_PARAMS, param );
|
params.put( k_PARAMS, param );
|
||||||
String paramsString = getPostDataString( params );
|
String paramsString = getPostDataString( params );
|
||||||
|
|
||||||
if ( null != paramsString ) {
|
if ( null != conn && null != paramsString ) {
|
||||||
try {
|
try {
|
||||||
conn.setReadTimeout( 15000 );
|
conn.setReadTimeout( 15000 );
|
||||||
conn.setConnectTimeout( 15000 );
|
conn.setConnectTimeout( 15000 );
|
||||||
|
@ -294,6 +294,9 @@ public class NetUtils {
|
||||||
} catch( java.io.IOException ioe ) {
|
} catch( java.io.IOException ioe ) {
|
||||||
Log.ex( TAG, ioe );
|
Log.ex( TAG, ioe );
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Log.e( TAG, "not running conn %s with params %s", conn,
|
||||||
|
paramsString );
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -126,7 +126,11 @@ public class XWPrefs {
|
||||||
|
|
||||||
public static String getDefaultRelayUrl( Context context )
|
public static String getDefaultRelayUrl( Context context )
|
||||||
{
|
{
|
||||||
return getPrefsString( context, R.string.key_relay_url );
|
String result = getPrefsString( context, R.string.key_relay_url );
|
||||||
|
if ( result == null || 0 == result.length() ) {
|
||||||
|
result = context.getString( R.string.default_relay_url );
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean getSkipToWebAPI( Context context )
|
public static boolean getSkipToWebAPI( Context context )
|
||||||
|
|
Loading…
Reference in a new issue