mraa.c: Add fix for dereferencing of a null pointer
@@ -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();
}
