Check if there is a current icon item in the device manager. Fixes #4604 #4555 

When we open the device properties dialog there is no selected icon so this segfault. I just added a condition to be sure that *icon->currentItem* is not *null*.

(#4604 was a duplicate of #4555).