It happend while I was attacking enemy bases with some gun turrets and wanted to put bullets into an empty gun turret.Resource amount needs to be larger than 0.
Did load the autosave and it happend again a few times, but not everytime though.
No mods installed.