We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18601d5 commit 001e8c4Copy full SHA for 001e8c4
Basalt/Object.lua
@@ -588,12 +588,14 @@ return function(name)
588
self:registerEvent("mouse_drag", v)
589
end
590
591
- self.parent:addEvent("mouse_drag", self)
592
- activeEvents["mouse_drag"] = true
593
- self.parent:addEvent("mouse_click", self)
594
- activeEvents["mouse_click"] = true
595
- self.parent:addEvent("mouse_up", self)
596
- activeEvents["mouse_up"] = true
+ if(self.parent~=nil)then
+ self.parent:addEvent("mouse_drag", self)
+ activeEvents["mouse_drag"] = true
+ self.parent:addEvent("mouse_click", self)
+ activeEvents["mouse_click"] = true
+ self.parent:addEvent("mouse_up", self)
597
+ activeEvents["mouse_up"] = true
598
+ end
599
return self
600
end;
601
0 commit comments