smartdevicelink/sdl_ios

Update SoftButtonObject initialization with invalid configurations

joeljfischer opened this issue · 0 comments

Bug Report

Currently we return nil if a SoftButtonObject is created with two states that are the same. There are other cases that should be handled, such as the state array having no objects or if there's no state with initialStateName.

Reproduction Steps
  1. Create a soft button object with no states
Expected Behavior

An exception in DEBUG and a nil object in RELEASE

Observed Behavior

Undefined behavior

OS & Version Information
  • iOS Version: n/a
  • SDL iOS Version: 7.3.1
  • Testing Against: n/a
Test Case, Sample Code, and / or Example App

n/a