Macbook crashes when I upload a sketch

Could be pure luck, since I’ve only done this since 2 days ago, but my mac doesn’t seem to crash anymore when I use an externally powered usb hub