Commit 15e9218c authored by Vikram Narayanan's avatar Vikram Narayanan

lcd/cap: Fix null pointer dereference

Signed-off-by: Vikram Narayanan's avatarVikram Narayanan <vikram186@gmail.com>
parent 64912900
......@@ -31,7 +31,7 @@ void lcd_cptr_free(cptr_t slot)
struct cspace *get_current_cspace(struct task_struct *c)
{
return current->lcd->cspace;
return current->lcd ? current->lcd->cspace : NULL;
}
/* EXPORTS -------------------------------------------------- */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment