Fix for bug 397995.
When you activate the "Edit Shapes Tool", but select no shape, any change of foreground color from any selector triggers the mentioned assert.
With this patch the condition is checked before trying to apply color to no shapes, so the assert is gone. I have tested changing fill color of selected shapes by clicking the selectors and in the tools docker, both works.