Skip to content

Commit

Permalink
Fixed possible NPE when shutting down.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Luc Paour committed Nov 23, 2002
1 parent 8329ea2 commit 25f79fe
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
18 changes: 11 additions & 7 deletions com/gallery/GalleryRemote/MainFrame.java
Expand Up @@ -193,14 +193,18 @@ void thisWindowClosing( java.awt.event.WindowEvent e ) {
PropertiesFile p = GalleryRemote.getInstance().properties;
for (int i = 0; i < galleries.getSize(); i++) {
Gallery g = (Gallery) galleries.getElementAt(i);
p.setProperty( "url." + i, g.getUrlString() );

if (g.getUsername() != null) {
p.setProperty( "username." + i, g.getUsername() );
}

if (p.getBooleanProperty("savePasswords") && g.getPassword() != null) {
p.setBase64Property( "password." + i, g.getPassword() );
String url = g.getUrlString();
if ( url != null) {
p.setProperty( "url." + i, url );

if (g.getUsername() != null) {
p.setProperty( "username." + i, g.getUsername() );
}

if (p.getBooleanProperty("savePasswords") && g.getPassword() != null) {
p.setBase64Property( "password." + i, g.getPassword() );
}
}
}

Expand Down
6 changes: 5 additions & 1 deletion com/gallery/GalleryRemote/model/Gallery.java
Expand Up @@ -235,7 +235,11 @@ public synchronized void addAlbum( Album a ) {
*@return The url value
*/
public String getUrlString() {
return url.toString();
if (url != null) {
return url.toString();
} else {
return null;
}
}


Expand Down
8 changes: 4 additions & 4 deletions defaults.properties
Expand Up @@ -83,12 +83,12 @@ updateCheck=true
updateUrl=http://gallery.sourceforge.net/gallery_remote_version_check.php

# Check for unofficial beta updates on launch
updateCheckBeta=true
updateCheckBeta=false
updateUrlBeta=http://gallery.sourceforge.net/gallery_remote_version_check_beta.php

#
# --- Do not edit below this line ---
#
version=1.0b12
releaseDate=2002/11/10
aboutText=Gallery Remote\n \n \nA part of the Gallery Open-Source Project\nhttp://gallery.sourceforge.net\n \n \nMaintained by Pierre-Luc Paour\n \nInitial version by Chris Smith\n \n \nContributors:\n \nTim Miller\nDolan Halbrook
version=1.0
releaseDate=2002/11/11
aboutText=Gallery Remote\n \n \nA part of the Gallery Open-Source Project\nhttp://gallery.sourceforge.net\n \n \nMaintained by Pierre-Luc Paour\n \nInitial version by Chris Smith\n \n \nContributors:\n \nTim Miller\nDolan Halbrook\n \n \nArtwork by Ross A. Reyman
14 changes: 7 additions & 7 deletions gallery_remote.iap_xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This script was automatically generated using Zero G's InstallAnywhere 5.0.5 Enterprise, Build 1626
STATUS: Fully Functional LICENSED Edition
DATE: Mon Nov 11 12:05:31 CET 2002 -->
DATE: Mon Nov 18 11:33:25 CET 2002 -->
<InstallAnywhere_Deployment_Project increments="2093">
<!-- ** DO NOT EDIT ** Essential authorization and configuration data ** DO NOT EDIT ** -->
<essentialScriptInfo>
Expand All @@ -10,7 +10,7 @@
<scriptID>12,42,11,90,88,54,51,55,52,53,56,70,88,56,70,88</scriptID>
<buildID>3,13,71,87,105,110,100,111,119,115,32,88,80,44,32,53,46,49,44,32,120,56,54,59,32,74,97,118,97,32,49,46,52,46,48,95,48,49,44,32,83,117,110,32,77,105,99,114,111,115,121,115,116,101,109,115,32,73,110,99,46,44,32,104,116,116,112,58,47,47,106,97,118,97,46,115,117,110,46,99,111,109,47,59,32,101,110,44,32,85,110,107,110,111,119,110,59,32,67,112,49,50,53,50</buildID>
<!-- The authorizationID may change between project saves and builds. This does not effect the integrity of the project, nor do changes in this value represent changes in the actual InstallAnywhere project. -->
<authorizationID>1,0,0,-16,115,-49,-128,-48,80,112,114,103,83,98,113,97,113,81,49,67,90,65,74,77,72,68,64,69,66,69,48,63,87,5,2,11,5,38,98,1,0,0,0</authorizationID>
<authorizationID>1,0,0,-16,-109,-65,-96,16,80,112,114,103,83,98,113,97,113,81,49,67,90,65,74,77,72,68,64,69,66,69,48,63,87,5,2,12,5,37,102,1,0,0,0</authorizationID>
</essentialScriptInfo>
<installationObjects uniqueObjects="109">
<object class="com.zerog.ia.installer.Installer" objectID="e14b381f9883">
Expand Down Expand Up @@ -166,7 +166,7 @@ it will search for ones in this list]]></string>
</object>
</method>
<method name="addElement">
<object class="com.zerog.ia.installer.util.LAXPropertyData" objectID="86463e64a759">
<object class="com.zerog.ia.installer.util.LAXPropertyData" objectID="aa36b056a757">
<property name="propertyValue">
<string><![CDATA[com.gallery.GalleryRemote.GalleryRemote]]></string>
</property>
Expand Down Expand Up @@ -250,7 +250,7 @@ and any path to a file to read from that file]]></string>
<string><![CDATA[GalleryRemote.jar]]></string>
</property>
<property name="fileSize">
<long>334578</long>
<long>335460</long>
</property>
<property name="macBinary">
<boolean>false</boolean>
Expand Down Expand Up @@ -706,7 +706,7 @@ Press 'Done' to quit the installer.]]></string>
<object class="java.util.Properties">
<method name="put">
<string><![CDATA[com.zerog.ia.project.save.last.date]]></string>
<string><![CDATA[Mon Nov 11 12:05:30 CET 2002]]></string>
<string><![CDATA[Mon Nov 18 11:33:24 CET 2002]]></string>
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.build.options.optimization.platform.merge]]></string>
Expand Down Expand Up @@ -746,7 +746,7 @@ Press 'Done' to quit the installer.]]></string>
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.project.build.last.date]]></string>
<string><![CDATA[Mon Nov 11 12:05:30 CET 2002]]></string>
<string><![CDATA[Mon Nov 18 11:33:24 CET 2002]]></string>
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.installer.options.heap.size.initial]]></string>
Expand Down Expand Up @@ -1309,7 +1309,7 @@ and any path to a file to read from that file]]></string>
<string><![CDATA[ChangeLog]]></string>
</property>
<property name="fileSize">
<long>6675</long>
<long>6846</long>
</property>
<property name="macBinary">
<boolean>false</boolean>
Expand Down

0 comments on commit 25f79fe

Please sign in to comment.