From b3072cd91db0f389cd1d240fab9dc70f15792384 Mon Sep 17 00:00:00 2001
From: Robert Izzard <r.izzard@surrey.ac.uk>
Date: Fri, 18 Oct 2019 15:49:32 +0200
Subject: [PATCH] reorder a bit

---
 src/novae/nova_event_handler.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/novae/nova_event_handler.c b/src/novae/nova_event_handler.c
index c59fda166..8b6c9861f 100644
--- a/src/novae/nova_event_handler.c
+++ b/src/novae/nova_event_handler.c
@@ -65,11 +65,7 @@ Event_handler_function nova_event_handler(void * const eventp,
     exploder->mass -= dm_lost;
     exploder->novastate = NOVA_STATE_POST;
 
-    /*
-     * Accrete some on the companion
-     */
-    donor->mass += dm_gain;
-    
+   
     /*
      * calculate nova yield abundances
      */
@@ -92,8 +88,10 @@ Event_handler_function nova_event_handler(void * const eventp,
                        YIELD_NOT_FINAL,
                        NUCSYN_SOURCE_NOVAE);
 
-    /* should we call nucsyn remove dm here? */
     
+    /*
+     * Accrete some on the companion?
+     */
     if(Is_not_zero(dm_gain))
     {
       
@@ -106,6 +104,7 @@ Event_handler_function nova_event_handler(void * const eventp,
             donor->dmacc,donor->Xacc,
             dm_gain,Xnova
             );
+        donor->mass += dm_gain;
         donor->dmacc += dm_gain;
 
         /*
-- 
GitLab