g0orx / linhpsdr

Linux HPSDR
GNU General Public License v3.0
74 stars 45 forks source link

Fix null pointer error with radio->transmitter in rigctl #89

Closed fventuri closed 3 years ago

fventuri commented 3 years ago

@frspin noticed a null pointer error with radio->transmitter in rigctl.c; this pull request fixes that

frspin commented 3 years ago

Il 22/11/20 23:25, John Melton ha scritto:

Merged #89 https://github.com/g0orx/linhpsdr/pull/89 into master.

Another point with a segmentation error.

When selecting a frequency from bookmark linhpsdr crash. This is gdb output:

0 0x000055e24247160f in tree_selection_activated_cb (

treeview=<optimized out>, path=0x55e24552f8a0, col=<optimized out>,
data=0x55e242e680a0) at bookmark_dialog.c:392

392 if(radio->transmitter->rx==rx) { [Current thread is 1 (Thread 0x7f133e547ec0 (LWP 333068))] (gdb) print rx $1 = (RECEIVER ) 0x55e242e680a0 (gdb) print radio->transmitter->rx Cannot access memory at address 0x70 (gdb) print radio->transmitter $2 = (TRANSMITTER ) 0x0

Regards

Franco Spinelli IW2DHW