don't access invalid pointer.
Change-Id: Ibdbf6df6adbe9f9807ed45b80e4d8ee3ffb9a715
*
* @return The array of rotation values
*
+ * @warning @c NULL will be returned if @a view or @a count is invalid.
+ *
* @see ui_view_set_available_rotations()
*/
EAPI const int *ui_view_get_available_rotations(ui_view *view, unsigned int *count);
*
* @return The array of rotation values.
*
+ * @warning @c nullptr will be returned if @a count is invalid.
+ *
* @see setAvailableRotations()
*/
const int *getAvailableRotations(unsigned int *count);
const int *UiIfaceViewImpl::getAvailableRotations(unsigned int *count)
{
+ if (!count) return nullptr;
+
static int rots[MAX_NUM_OF_AVAILABLE_ROTATIONS] = {0, 90, 180, 270};
if (this->_rotationCount > 0) {