Changeset 17282 for gli

Show
Ignore:
Timestamp:
15.09.2008 12:23:30 (11 years ago)
Author:
ak19
Message:

Fixed ull-pointer exception thrown (when using Z3950) by code recently added for Wget.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/gui/DownloadPane.java

    r17235 r17282  
    169169    edit_pane.add(mode_pane,BorderLayout.CENTER); 
    170170    edit_pane.add(button_pane,BorderLayout.PAGE_END); 
    171  
     171     
    172172    // Add to "this" 
    173173    setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
     
    502502        Download current_download = (Download)download_map.get(mode); 
    503503        Argument arg_url = current_download.getArgument("url"); 
    504         String url_str = arg_url.getValue(); 
    505         String redirect_url_str = getRedirectURL(url_str); 
    506          
    507         // only update the Argument and its GUI ArgumentControl if the URL 
    508         // has in fact changed 
    509         if(!url_str.equals(redirect_url_str)) { 
    510             arg_url.setValue(redirect_url_str); 
    511             updateArgument(arg_url, redirect_url_str); 
    512         } 
    513      
     504        if(arg_url != null) { // it's null for z3950 and possibly for other downloaders 
     505            String url_str = arg_url.getValue(); 
     506            String redirect_url_str = getRedirectURL(url_str); 
     507             
     508            // only update the Argument and its GUI ArgumentControl if the URL 
     509            // has in fact changed 
     510            if(!url_str.equals(redirect_url_str)) { 
     511            arg_url.setValue(redirect_url_str); 
     512            updateArgument(arg_url, redirect_url_str); 
     513            } 
     514        } 
    514515        getter.newDownloadJob((Download)download_map.get(mode) ,mode,proxy_url); 
    515516        }