Make sure your playing doesn't clash horribly?
If you aren't sure how to do this play what the guitar does for a few bars then experiment with ways that you can branch out and still keep the riff/groove going.
Also talk to guitar player (they are people too

) ask him or her questions if you have them.
For something easy start with a bluesy, scalar bassline while the guitar plays a lick, or try something funky and make him try to adapt to you.
If that doesn't work fall back on easy well known riffs (Sabbath, Zeppelin, Beatles, etc) and you and your guitarist should be able to jam something out.
Hope that helped, thats what I do when I jam with new guitarists.