Avoid std::string crash when NULL is returned 28/80128/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 14 Jul 2016 15:46:34 +0000 (16:46 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 14 Jul 2016 16:24:13 +0000 (17:24 +0100)
commit3ff8af57bb6fe312089ccfcbc95acf56d7b509a3
treeab7d6ef85d5cfb1ac72c0f36c1d4b785c9f1e1be
parent7e670cd9cb16d7b93787a147088d67f87086f8b8
Avoid std::string crash when NULL is returned

GetDefaultPropertyName() can return NULL.
If we try to initialise a std::string with NULL, this causes an exception.

The solution is to just check that the returned value from GetDefaultPropertyName()
and return an empty std::string if it is NULL.

Change-Id: Iecf02228cade112b2922a0fbf0e9cef73a0df13d
automated-tests/src/dali/utc-Dali-GestureDetector.cpp
dali/internal/event/common/object-impl.cpp