Skip to content

Commit a253093

Browse files
Don't try to activate Dump Sane Options if it is not there.
1 parent 62ec69b commit a253093

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/PreferencesView.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,11 @@ namespace Gorfector
321321
ADW_SPIN_ROW(m_PngCompressionLevel), m_PngWriterStateComponent->GetCompressionLevel());
322322
adw_spin_row_set_value(ADW_SPIN_ROW(m_JpegQuality), m_JpegWriterStateComponent->GetQuality());
323323

324-
adw_switch_row_set_active(ADW_SWITCH_ROW(m_DumpSaneOptions), m_DeviceSelectorState->IsDumpSaneEnabled());
324+
if (m_DumpSaneOptions != nullptr)
325+
{
326+
adw_switch_row_set_active(
327+
ADW_SWITCH_ROW(m_DumpSaneOptions), m_DeviceSelectorState->IsDumpSaneEnabled());
328+
}
325329
}
326330
};
327-
328331
}

0 commit comments

Comments
 (0)