gdb/dwarf: move DWP htab nullptr check to lookup_dwo_unit_in_dwp

cutu_reader::lookup_dwo_cutu gets hold of the right htab for the kind of
unit to look up (CU or TU), but then just uses the pointer to know if it
should call lookup_dwo_unit_in_dwp or not.  lookup_dwo_unit_in_dwp then
uses the same condition to obtain the correct htab.  I think it would
make more sense to return early from lookup_dwo_unit_in_dwp instead, if
the required htab does not exist.

Change-Id: I6f8f96aba2452f8261b3c60667e72fb21b97c89d
Approved-By: Tom Tromey <tom@tromey.com>
1 file changed