Project

General

Profile

« Previous | Next » 

Revision dd016102

Added by Leszek Koltunski over 2 years ago

Bugfix.

View differences:

src/main/java/org/distorted/network/RubikNetwork.java
156 156

  
157 157
    if( len==0 )
158 158
      {
159
      mReceiver.error("1");
159
      if( mReceiver!=null ) mReceiver.error("1");
160 160
      return false;
161 161
      }
162 162
    else if( len<=2 )
163 163
      {
164
      mReceiver.error(mScores);
164
      if( mReceiver!=null ) mReceiver.error(mScores);
165 165
      return false;
166 166
      }
167 167

  
......
408 408
        }
409 409
      catch( final Exception e)
410 410
        {
411
        mReceiver.message("Failed to get an answer from the High Scores server");
411
        if( mReceiver!=null ) mReceiver.message("Failed to get an answer from the High Scores server");
412 412
        return false;
413 413
        }
414 414
      }
415 415
    catch( final UnknownHostException e )
416 416
      {
417
      mReceiver.message("No access to Internet");
417
      if( mReceiver!=null ) mReceiver.message("No access to Internet");
418 418
      return false;
419 419
      }
420 420
    catch( final SecurityException e )
421 421
      {
422
      mReceiver.message("Application not authorized to connect to the Internet");
422
      if( mReceiver!=null ) mReceiver.message("Application not authorized to connect to the Internet");
423 423
      return false;
424 424
      }
425 425
    catch( final Exception e )
426 426
      {
427
      mReceiver.message(e.getMessage());
427
      if( mReceiver!=null ) mReceiver.message(e.getMessage());
428 428
      return false;
429 429
      }
430 430

  
431 431
    if( mScores.length()==0 )
432 432
      {
433
      mReceiver.message("Failed to download scores");
433
      if( mReceiver!=null ) mReceiver.message("Failed to download scores");
434 434
      return false;
435 435
      }
436 436

  

Also available in: Unified diff