This paper presents a context-dependent theory of decision under risk. The relevant contextual factor is the presence of a riskless lottery in a preference comparison. The theory only deviates from expected utility if the set of options contains both riskless and risky lotteries. The main motivation for the theory is to explain the gambling effect. Contrary to previous theories of the gambling effect, the present theory is consistent with stochastic dominance. It can, however, violate transitivity. The theory allows for a decomposition of the interaction between risk aversion and gambling aversion and thereby extends the classical Arrow-Pratt measure of risk aversion.