X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Fmanage.c;fp=ioncore%2Fmanage.c;h=f1b04c60f5e82f29db0378738388eb337b6dd1c4;hp=69b7711f9f7311e060d0a8c4cd53ece76af9193a;hb=f869221ce49f0fb7cca48eee28daff8684305963;hpb=720e6978185b09f2b2f60a6b96018238085a7238 diff --git a/ioncore/manage.c b/ioncore/manage.c index 69b7711..f1b04c6 100644 --- a/ioncore/manage.c +++ b/ioncore/manage.c @@ -339,6 +339,23 @@ bool region_rescue_child_clientwins(WRegion *reg, WRescueInfo *info) } +WPHolder *rescueinfo_pholder(WRescueInfo *info) +{ + if(info->test) + return NULL; + + if(info->ph==NULL){ + info->ph=region_get_rescue_pholder(info->get_rescue); + if(info->ph==NULL){ + info->failed_get=TRUE; + return NULL; + } + } + + return info->ph; +} + + /* Bah, unsplitissä oikestaan pitäisi tehä non-deep rescue */ bool region_do_rescue_this(WRegion *tosave_, WRescueInfo *info, int ph_flags) @@ -359,19 +376,13 @@ bool region_do_rescue_this(WRegion *tosave_, WRescueInfo *info, int ph_flags) if(tosave==NULL){ return region_rescue_clientwins(tosave_, info); - }else if(info->test){ - return FALSE; }else{ int phf=(info->flags®ION_RESCUE_PHFLAGS_OK ? ph_flags : 0); + WPHolder *ph=rescueinfo_pholder(info); - if(info->ph==NULL){ - info->ph=region_get_rescue_pholder(info->get_rescue); - if(info->ph==NULL){ - info->failed_get=TRUE; - return FALSE; - } - } - return pholder_attach(info->ph, phf, tosave); + return (ph==NULL + ? FALSE + : pholder_attach(info->ph, phf, tosave)); } }