mraa.c: Add fix for dereferencing of a null pointer
Signed-off-by: Cosmin Popescu <gabrielcosmin.popescu@gmail.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
committed by
Mihai Tudor Panu
parent
9fe2883e6a
commit
88a8bb22b6
@@ -112,7 +112,7 @@ mraa_boolean_t mraa_is_kernel_chardev_interface_compatible()
|
||||
|
||||
mraa_boolean_t mraa_is_platform_chardev_interface_capable()
|
||||
{
|
||||
if (plat->chardev_capable) {
|
||||
if ((plat != NULL) && (plat->chardev_capable)) {
|
||||
return mraa_is_kernel_chardev_interface_compatible();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user