Description: Autogenerated patch header for a single-debian-patch file.
 The delta against upstream is either kept as a single patch, or maintained
 in some VCS, and exported as a single patch instead of more manageable
 atomic patches.
Forwarded: not-needed

---
--- polymake-4.11.orig/bundled/singular/apps/ideal/src/singularIdeal.cc
+++ polymake-4.11/bundled/singular/apps/ideal/src/singularIdeal.cc
@@ -236,22 +236,24 @@ public:
       arg.next->data=(void *)idCopy(J);
       // call primdecSY
       BOOLEAN res=iiMake_proc(sathdl, nullptr ,&arg);
-      if(!res && (iiRETURNEXPR.Typ() == LIST_CMD)){
-         lists L = (lists)iiRETURNEXPR.Data();
-         SingularIdeal_wrap* result;
-         if(L->m[0].Typ() == IDEAL_CMD){
-            result = new SingularIdeal_impl((::ideal) (L->m[0].Data()),singRing);
-         } else {
-            throw std::runtime_error("Something went wrong for the primary decomposition");
+      if(!res) {
+         ::ideal iddata = nullptr;
+         if (iiRETURNEXPR.Typ() == LIST_CMD) {
+            lists L = (lists)iiRETURNEXPR.Data();
+            if(L->m[0].Typ() == IDEAL_CMD)
+               iddata = (::ideal) L->m[0].Data();
+         } else if (iiRETURNEXPR.Typ() == IDEAL_CMD) {
+            iddata = (::ideal) iiRETURNEXPR.Data();
+         }
+         if (iddata != nullptr) {
+            SingularIdeal_wrap* result = new SingularIdeal_impl(iddata, singRing);
+            iiRETURNEXPR.CleanUp();
+            iiRETURNEXPR.Init();
+            return result;
          }
-         iiRETURNEXPR.CleanUp();
-         iiRETURNEXPR.Init();
-         return result;
-      } else {
-         iiRETURNEXPR.Init();
-         throw std::runtime_error("Something went wrong for the saturation");
       }
-
+      iiRETURNEXPR.Init();
+      throw std::runtime_error("saturation: unable to parse ideal from return value");
    }
 
    Array<SingularIdeal_wrap*> primary_decomposition() const
