Fix crash when dragging and dropping the only DKDM.
authorCarl Hetherington <cth@carlh.net>
Sat, 6 Jan 2018 23:33:17 +0000 (23:33 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 6 Jan 2018 23:33:17 +0000 (23:33 +0000)
src/tools/dcpomatic_kdm.cc

index 9995d80a9819111056549285610c7740d44df378..b82cec2ad56d6b19a7097ec81930583f473a6bcf 100644 (file)
@@ -380,7 +380,7 @@ private:
        {
                DKDMMap::iterator from = _dkdm_id.find (_dkdm->GetSelection ());
                DKDMMap::iterator to = _dkdm_id.find (ev.GetItem ());
-               if (from == _dkdm_id.end() || to == _dkdm_id.end()) {
+               if (from == _dkdm_id.end() || to == _dkdm_id.end() || from->first == to->first) {
                        return;
                }