summaryrefslogtreecommitdiff
path: root/livetree.c
diff options
context:
space:
mode:
Diffstat (limited to 'livetree.c')
-rw-r--r--livetree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/livetree.c b/livetree.c
index 6846ad2..184703a 100644
--- a/livetree.c
+++ b/livetree.c
@@ -540,7 +540,10 @@ struct node *get_node_by_phandle(struct node *tree, cell_t phandle)
{
struct node *child, *node;
- assert((phandle != 0) && (phandle != -1));
+ if ((phandle == 0) || (phandle == -1)) {
+ assert(generate_fixups);
+ return NULL;
+ }
if (tree->phandle == phandle) {
if (tree->deleted)