<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1477,13 +1477,15 @@ public class AuctionEntry extends ActiveRecord implements Comparable&lt;AuctionEntr
     return r_flags;
   }
 
+  private static AuctionInfo sAuction = new AuctionInfo();
+
   public AuctionInfo getAuction() {
-    if(mAuction == null) {
+    if(mAuction == null || mAuction == sAuction) {
       String aid = get(&quot;auction_id&quot;);
       if(aid != null &amp;&amp; aid.length() != 0) {
         mAuction = AuctionInfo.findFirstBy(&quot;id&quot;, aid);
       }
-      if(mAuction == null &amp;&amp; getString(&quot;identifier&quot;) != null) {
+      if((mAuction == null || mAuction == sAuction) &amp;&amp; getString(&quot;identifier&quot;) != null) {
         mAuction = AuctionInfo.findByIdentifier(getString(&quot;identifier&quot;));
       }
 
@@ -1499,6 +1501,8 @@ public class AuctionEntry extends ActiveRecord implements Comparable&lt;AuctionEntr
       }
     }
 
+    if(mAuction == null) mAuction = sAuction;
+
     return mAuction;
   }
 
@@ -1510,7 +1514,7 @@ public class AuctionEntry extends ActiveRecord implements Comparable&lt;AuctionEntr
    * @param inAI - The AuctionInfo object to make the new core data.  Must not be null.
    */
   public void setAuctionInfo(AuctionInfo inAI) {
-    if(mAuction == null) {
+    if(mAuction == null || mAuction == sAuction) {
       setDefaultCurrency(inAI.getDefaultCurrency());
     }
 
@@ -1682,7 +1686,7 @@ public class AuctionEntry extends ActiveRecord implements Comparable&lt;AuctionEntr
   /*************************/
 
   public String saveDB() {
-    if(mAuction == null) return null;
+    if(mAuction == null || mAuction == sAuction) return null;
 
     String auctionId = mAuction.saveDB();
     if(auctionId != null) set(&quot;auction_id&quot;, auctionId);</diff>
      <filename>src/com/jbidwatcher/auction/AuctionEntry.java</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>023fdbaeb7a04360f6fe791db636417035eb00b4</id>
    </parent>
  </parents>
  <author>
    <name>Morgan Schweers</name>
    <email>cyberfox@jbidwatcher.com</email>
  </author>
  <url>http://github.com/cyberfox/jbidwatcher/commit/c7112aca9f4476aaa435258766f9a4b29b9c9a96</url>
  <id>c7112aca9f4476aaa435258766f9a4b29b9c9a96</id>
  <committed-date>2009-10-10T16:22:18-07:00</committed-date>
  <authored-date>2009-10-10T16:22:18-07:00</authored-date>
  <message>Use a stub 'AuctionInfo' object, when we can't actually retrieve a real one, so that dozens of methods don't throw NPE's randomly in the moments when an auction is deleted, but the UI is trying to display the entry.


git-svn-id: svn://svn.jbidwatcher.com/jbidwatcher/trunk@1021 b1acfa68-eb39-11db-b167-a3a8cd6b847e</message>
  <tree>fb65e1f8ef3fa3b4845b329ae9eb75cb6afd8302</tree>
  <committer>
    <name>Morgan Schweers</name>
    <email>cyberfox@jbidwatcher.com</email>
  </committer>
</commit>
