Skip to content
  • Àlex Fiestas's avatar
    Always return an object if the device was of interest when added · c9495ee7
    Àlex Fiestas authored
    Finally this nasty gets fixed, problem is easy:
    -Udev calls deviceAdded
    -We emit deviceAdded
    -Device becomes invalid (in udev)
    -UdevManager::createDevice is called, returns 0
    -deviceRemoved is emit
    -Q_ASSERT explodes because we returned 0.
    
    This patch basically ensures that if the device was of interest when
    deviceAdded was called a UdevDevice object is always returned even if
    the device is dummy. That's the best we can do.
    
    BUG: 302243
    FIXED-IN: 4.11
    (cherry picked from commit 75050f6a)
    c9495ee7