libt2n: (tomj) make result_container's has_exception and has_result a bit more robust
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 26 Nov 2008 09:18:29 +0000 (09:18 +0000)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 26 Nov 2008 09:18:29 +0000 (09:18 +0000)
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