used xmalloc instead of malloc
[libfirm] / ir / ir / irprog_t.h
index ecaa8f1..77a64f2 100644 (file)
@@ -18,7 +18,7 @@
 # define _IRPROG_T_H_
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include "firm_config.h"
 #endif
 
 #include "irprog.h"
@@ -88,8 +88,8 @@ __get_irp_n_irgs(void) {
 
 static INLINE ir_graph *
 __get_irp_irg(int pos){
-  assert (irp && irp->graphs);
   if (get_visit_pseudo_irgs()) return get_irp_allirg(pos);
+  assert(0 <= pos && pos <= get_irp_n_irgs());
   return irp->graphs[pos];
 }