libt2n: (tomj) make result_container's has_exception and has_result a bit more robust
[libt2n] / src / container.hxx
index 020194b..560df1c 100644 (file)
@@ -80,9 +80,9 @@ class result_container
         result* get_result(void);
 
         bool has_exception()
-            { return (result_type==exception); }
+            { return (result_type==exception && ex != NULL); }
         bool has_result()
-            { return (result_type==regular); }
+            { return (result_type==regular && res != NULL); }
 };
 
 /** @brief contains a libt2n::command