check for null pointer in Locations::remove()
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 12 Aug 2016 16:48:29 +0000 (12:48 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 12 Aug 2016 16:48:35 +0000 (12:48 -0400)
libs/ardour/location.cc

index 0a48b43d0eb71a1b85dfd40e4cdc85d032e7d56f..2fd63b61952f729b0b9df27f775cf9a493b0a756 100644 (file)
@@ -994,6 +994,10 @@ Locations::remove (Location *loc)
        bool was_current = false;
        LocationList::iterator i;
 
+       if (!loc) {
+               return;
+       }
+
        if (loc->is_session_range()) {
                return;
        }
@@ -1427,4 +1431,3 @@ Locations::find_all_between (framepos_t start, framepos_t end, LocationList& ll,
                }
        }
 }
-