Author: sayer
Date: 2009-05-19 16:23:37 +0200 (Tue, 19 May 2009)
New Revision: 1392

Modified:
   trunk/core/AmArg.cpp
Log:
correct pop() on empty AmArg

Modified: trunk/core/AmArg.cpp
===================================================================
--- trunk/core/AmArg.cpp        2009-05-19 14:07:30 UTC (rev 1391)
+++ trunk/core/AmArg.cpp        2009-05-19 14:23:37 UTC (rev 1392)
@@ -177,6 +177,12 @@
 
 void AmArg::pop(AmArg &a) {
   assertArray();
+  if (!size()) {
+    if (a.getType() == AmArg::Undef) 
+      return;
+    a = AmArg();
+    return;
+  }
   a = v_array->front();
   v_array->erase(v_array->begin());
 }

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to